Zaktualizuj 'Traktorek/ran.py'

This commit is contained in:
Kinga Jagodzińska 2020-04-28 19:08:11 +00:00
parent b9fbdaae94
commit 567b65ae92

View File

@ -3,9 +3,6 @@ import sys
import random import random
from Tractor import Tractor from Tractor import Tractor
# dodać growth rate
# Dodać co jeśli pusta
# Pamiętać o zmianie algorytmu po dodaniu growth rate
class Game(object): class Game(object):
@ -102,40 +99,10 @@ class Game(object):
def color(self, z): def color(self, z):
if self.fields[z][0] == 'owies': if self.fields[z][0] == 'owies':
return (255, 200, 55) return (255, 200, 55)
# if self.fields[z][1] == True:
# if self.fields[z][2] == True:
# return (255, 200, 55)
# elif self.fields[z][2] == False:
# return (255, 200, 100)
# elif self.fields[z][1] == False:
# if self.fields[z][2] == True:
# return (255, 170, 55)
# elif self.fields[z][2] == False:
# return (255, 170, 100)
elif self.fields[z][0] == 'jęczmień': elif self.fields[z][0] == 'jęczmień':
return (170, 150, 40) return (170, 150, 40)
# if self.fields[z][1] == True:
# if self.fields[z][2] == True:
# return (170, 150, 40)
# elif self.fields[z][2] == False:
# return (170, 150, 85)
# elif self.fields[z][1] == False:
# if self.fields[z][2] == True:
# return (170, 120, 40)
# elif self.fields[z][2] == False:
# return (170, 120, 85)
elif self.fields[z][0] == 'żyto': elif self.fields[z][0] == 'żyto':
return (100, 215, 80) return (100, 215, 80)
# if self.fields[z][1] == True:
# if self.fields[z][2] == True:
# return (100, 215, 80)
# elif self.fields[z][2] == False:
# return (100, 215, 125)
# elif self.fields[z][1] == False:
# if self.fields[z][2] == True:
# return (100, 185, 80)
# elif self.fields[z][2] == False:
# return (100, 185, 125)
elif self.fields[z][0] == 'marchew': elif self.fields[z][0] == 'marchew':
return (224, 60, 14) return (224, 60, 14)
elif self.fields[z][0] == 'rzodkiew': elif self.fields[z][0] == 'rzodkiew':
@ -147,10 +114,5 @@ class Game(object):
if __name__ == "__main__": if __name__ == "__main__":
Game() Game()