Commit 26b196bc authored by Constantin's avatar Constantin

initial treasure placement

parent 0e9065c0
......@@ -3,6 +3,7 @@ import selectors
import socket
import labyrinth
import random
import treasure
class Game:
def __init__(self, labyrinthFileName, adminPW, logFileName=None, port=1234):
......@@ -10,6 +11,9 @@ class Game:
self.admins = []
with open(labyrinthFileName,'r') as f:
self.labyrinth = labyrinth.Labyrinth(game=self,stream=f)
treasure = treasure.Treasure()
ttile = random.choice(self.labyrinth.getFreeTiles())
self.labyrinth.createThing(treasure,ttile)
self.sock = socket.socket()
self.sock.bind(('0.0.0.0', port))
self.sock.listen(100)
......
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