development #11

Merged
s452701 merged 3 commits from development into master 2021-06-03 15:42:55 +02:00
7 changed files with 72 additions and 976 deletions
Showing only changes of commit 551053fd22 - Show all commits

1040
data.txt

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@ class ResourceGenerator:
resource = world.component_for_entity(resource_ent, ResourceComponent)
inventory = world.component_for_entity(player, InventoryComponent)
answer = decision_tree.predict_answer(resource)
print(answer)
# print(answer)
inventory.add_item(resource.resource_type, 1)
game_map.remove_entity(pos.grid_position)
world.delete_entity(resource_ent, immediate=True)

View File

@ -17,5 +17,4 @@ class ResourceCollectionSystem(esper.Processor):
if collect.action == Action.MOVE:
self.world.remove_component(ent, CollectingResourceComponent)
print("HERE")
self.world.add_component(ent, MovingComponent())

View File

@ -21,7 +21,6 @@ class CollisionSystem(esper.Processor):
vector = Direction.get_vector(pos.direction)
moving.target = tuple(map(operator.add, vector, pos.grid_position))
print(moving.target)
moving.direction_vector = vector
if self.check_collision(moving.target):
self.world.remove_component(ent, MovingComponent)

View File

@ -11,7 +11,6 @@ from survival.systems.input_system import PathfindingComponent
class CollectingResourceComponent:
def __init__(self, action):
self.action = action
print(action)
class PathfindingMovementSystem(esper.Processor):

View File

@ -9,4 +9,3 @@ class TimeSystem(esper.Processor):
if time.timer > 1000:
time.add_time(1)
time.timer = 0
print(time)

View File

@ -3,7 +3,7 @@ import random
def generate_data():
f = open("data.txt", "w")
for i in range(1000):
for i in range(100):
weight = random.randint(0, 11)
eatable = bool(random.randint(0, 1))
toughness = random.randint(0, 3)