mend
This commit is contained in:
parent
219f523dac
commit
7392c8d3c4
7
game.py
7
game.py
@ -35,13 +35,6 @@ for x in range(PLAY_HEIGHT//64):
|
|||||||
grass = Grass(x,y)
|
grass = Grass(x,y)
|
||||||
cells[x].append(grass)
|
cells[x].append(grass)
|
||||||
|
|
||||||
for x in range(PLAY_HEIGHT//64):
|
|
||||||
cells.append([])
|
|
||||||
for y in range(PLAY_HEIGHT//64):
|
|
||||||
grass = Grass(x,y)
|
|
||||||
cells[x].append(grass)
|
|
||||||
print( cells )
|
|
||||||
|
|
||||||
#Losowanie domków i dodawanie je do mapy
|
#Losowanie domków i dodawanie je do mapy
|
||||||
home_len = home_amount
|
home_len = home_amount
|
||||||
while( home_len > 0 ):
|
while( home_len > 0 ):
|
||||||
|
@ -33,4 +33,3 @@ class House(Cell):
|
|||||||
|
|
||||||
def check_rubbish_status(self):
|
def check_rubbish_status(self):
|
||||||
print( "plastic: " + str(self.rubbish[PLASTIC]) + " glass: " + str(self.rubbish[GLASS]) + " metal: " + str(self.rubbish[METAL]) )
|
print( "plastic: " + str(self.rubbish[PLASTIC]) + " glass: " + str(self.rubbish[GLASS]) + " metal: " + str(self.rubbish[METAL]) )
|
||||||
|
|
2
utils.py
2
utils.py
@ -7,7 +7,7 @@ def set_home_amount():
|
|||||||
for o, amount in optlist:
|
for o, amount in optlist:
|
||||||
if o == '--home-count':
|
if o == '--home-count':
|
||||||
return int(amount)
|
return int(amount)
|
||||||
print('missing argument: --home-count <amount>')
|
print('Missing argument: --home-count <amount>')
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
except getopt.GetoptError as err:
|
except getopt.GetoptError as err:
|
||||||
print(err)
|
print(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user