Commit 67a1ab54 authored by Constantin's avatar Constantin
Browse files

stoooopid buuuaags

parent a1b4bea1
...@@ -3,7 +3,7 @@ import selectors ...@@ -3,7 +3,7 @@ import selectors
import socket import socket
import labyrinth import labyrinth
import random import random
import treasure from treasure import Treasure
class Game: class Game:
def __init__(self, labyrinthFileName, adminPW, logFileName=None, port=1234): def __init__(self, labyrinthFileName, adminPW, logFileName=None, port=1234):
...@@ -11,7 +11,7 @@ class Game: ...@@ -11,7 +11,7 @@ class Game:
self.admins = [] self.admins = []
with open(labyrinthFileName,'r') as f: with open(labyrinthFileName,'r') as f:
self.labyrinth = labyrinth.Labyrinth(game=self,stream=f) self.labyrinth = labyrinth.Labyrinth(game=self,stream=f)
treasure = treasure.Treasure() treasure = Treasure()
ttile = random.choice(self.labyrinth.getFreeTiles()) ttile = random.choice(self.labyrinth.getFreeTiles())
self.labyrinth.createThing(treasure,ttile) self.labyrinth.createThing(treasure,ttile)
self.sock = socket.socket() self.sock = socket.socket()
......
import thing import thing
class Treasure(Thing): class Treasure(thing.Thing):
def __str__(self): def __str__(self):
return "the treasure" return "the treasure"
......
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