Commit 84dd5265 authored by Ahmad Reza's avatar Ahmad Reza
Browse files

In vis.py the variable refresh_time has been deleted and now

the speed of the simulator can be changed with the variable
rounds_per_second.
parent 21fe8a0a
......@@ -30,11 +30,7 @@ busy_waiting_time = 1
print_frame_stats = False
# simulation parameters
rounds_per_second = 40
refresh_time = 1 #how many seconds to wait for a new round and a new frame. 1 means one round and frame every 1 second
#0.25 means one round and frame every 0.25 sec (250ms)
rounds_per_second = 1
# tile_alpha = 0.6
particle_alpha = 1
......@@ -42,7 +38,6 @@ particle_alpha = 1
marker_alpha = 1
def coords_to_sim(coords):
return coords[0], coords[1] * math.sqrt(3/4)
......@@ -429,7 +424,7 @@ class VisWindow(pyglet.window.Window):
return
self.dispatch_events()
#while actual simulation round is below max round
time.sleep(refresh_time)
time.sleep(1/rounds_per_second)
self.draw()
return
......
Started
Created particle at (0, 0)
Created tile with tile id 0436e5d0-7e6d-4038-945d-b420f419b87f on coords (1.0, 0.0)
Created marker with id 7affe1aa-f5e1-43d3-93d7-49767fc7abd5 on coords (3.0, 2.0)
Created tile with tile id 3e96bd4c-efb1-4703-ad71-316e6300b64f on coords (1.0, 0.0)
Created marker with id b72b3567-b432-466e-8d62-04d9302e8a21 on coords (3.0, 2.0)
Created particle at (1.0, 0.0)
Created particle at (-1.0, 0.0)
Created particle at (0.5, 1.0)
......@@ -20,12 +20,32 @@ Created particle at (0.0, 2.0)
Created particle at (0.0, -2.0)
Created particle at (-1.0, 2.0)
Created particle at (-1.0, -2.0)
Created tile with tile id d0ecad9f-9a59-4a02-9a2c-36f690d9d3c3 on coords (4.0, 6.0)
Created tile with tile id befb8f77-1048-4ab2-991a-ffd3d392e0a5 on coords (2.5, 7.0)
Created tile with tile id 0ba4f6af-46cc-4fdb-8ac7-36158d55c37c on coords (4.0, 8.0)
Created tile with tile id 69004558-9c28-4b34-9efa-8e209c1c397f on coords (2.5, 9.0)
Created tile with tile id 73706540-fa58-49ba-ad02-5a69f3025d07 on coords (4.0, 6.0)
Created tile with tile id 7cacdb3b-9ce5-42f0-9c7a-d70be0500d7e on coords (2.5, 7.0)
Created tile with tile id 3e97b427-8a70-4fdd-b835-5b6730a246a3 on coords (4.0, 8.0)
Created tile with tile id dabab542-59f0-4624-aa78-92b269c24fe5 on coords (2.5, 9.0)
Scanning for markers, tiles and particles
particle on (0, 0) is scanning for all in 1 hops
Got 7 in 1 hops
Testing Interface: Take Drop Tiles and Particles
Finished
Tile is not in the world
Take particle
particle with particle id 19a7f173-870e-48e7-acf5-2ea8c3da97ca has been taken
No tile taken for dropping
particle cannot be taken
Is not possible to drop the particle on that position
Tile cannot taken because particle is carrieng either a tile or a particle
Tile cannot taken because particle is carrieng either a tile or a particle
Is not possible to drop the particle on that position because it is occupied
particle cannot be taken
Particle succesfull dropped
particle with particle id d304b764-38a7-4c5e-afd2-3bcf2f4020bf is in the world
particle with particle id d304b764-38a7-4c5e-afd2-3bcf2f4020bf has been taken
Particle succesfull dropped
Tile with tile id 3e96bd4c-efb1-4703-ad71-316e6300b64f is in the world
Tile with tile id 3e96bd4c-efb1-4703-ad71-316e6300b64f has been taken
Tile has been dropped on the actual position
Tile is not in the world
No tile is taken for dropping
particle has been taken
Dropped particle on (-7, 0) coordinate
Supports Markdown
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