Commit 4331d928 authored by Ahmad Reza Cheraghi's avatar Ahmad Reza Cheraghi
Browse files

Merge branch 'master' into 'visualisierung'

# Conflicts:
#   config.ini
#   robotsOnTiles/
#   robotsOnTiles/
#   robotsOnTiles/scenarios/
#   robotsOnTiles/worlds/
parents a46b0127 0329772d
......@@ -22,7 +22,7 @@ max_particles=100
world =
#scenario =
#scenario =
#scenario =
#scenario =
#scenario =
#scenario =
......@@ -309,9 +309,8 @@ class CsvRoundData:
file_name ="/aggregate_rounds.csv"
csv_file = open(file_name, 'w', newline='')
writer_round = csv.writer(csv_file)
"""Average Min Max for all other metrics"""
writer_round.writerow(['Seed', 'Rounds Total',
'Location Counter',
'Location Created Sum', 'Location Created Avg',
'Location Created Min', 'Location Created Max',
......@@ -346,7 +345,7 @@ class CsvRoundData:
csv_interator = [self.seed, data['Round Number'].count(),
self.solution, self.task,
data['Location Created'].sum(), data['Location Created'].mean(),
......@@ -466,19 +466,7 @@ class Particle:
Deletes a tile on current position
:return: True: Deleting successful; False: Deleting unsuccessful
""""Particle %s is","is going to delete a tile on current position")
if self.coords in
return True
else:"Could not delet tile")
return False
def delete_tile_with(self, id):
def delete_tile(self, id):
Deletes a tile with a given tile-id
......@@ -860,29 +848,6 @@ class Particle:
return False
def take_particle(self):
Takes a particle on the actual position
:return: True: successful taken; False: unsuccessful taken
if self.carried_particle is None and self.carried_tile is None:
if self.coords in
self.carried_particle =[self.coords]
if self.carried_particle.take_me(coords=self.coords):"particle has been taken"), particles_taken=1)
return True
else:"particle could not be taken")
return False
else:"No particle on the actual position not in the world")
return False
else:"particle cannot taken because particle is carrieng either a particle or a particle")
return False
def take_particle_with(self, id):
......@@ -14,6 +14,7 @@ direction = [E, SE, SW, W, NW, NE]
def scenario(sim, world):
for particle in world.get_particle_list():
if particle.coords in world.get_tile_map_coords():
print("Found Tile")
\ No newline at end of file
def create_world(world):
world.add_particle(0, 0)
world.add_tile(1, 0)
world.add_particle(-1, 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment