diff --git a/Game_Client/Classes/Objects/World.py b/Game_Client/Classes/Objects/World.py index a1f3a58..4a82b34 100644 --- a/Game_Client/Classes/Objects/World.py +++ b/Game_Client/Classes/Objects/World.py @@ -3,11 +3,11 @@ from Classes.Objects.BoardField import BoardField class World(): __boardFields:list - __cardWidth:int = 200 - __cardHeight:int = 250 + __cardWidth:int = 150 + __cardHeight:int = 200 __cardOffset:int = 400 - def __init__(self, cardWidth:int=200, cardHeight:int=250, cardOffset:int=400): + def __init__(self, cardWidth:int=150, cardHeight:int=200, cardOffset:int=400): self.__boardFields = [] self.__cardWidth = cardWidth self.__cardHeight = cardHeight @@ -18,31 +18,33 @@ class World(): # TODO: rebuild these to use the BoardField Class and to append them to the __boardFields list # construct elements arround the playerfield # Todo add lifepoint label for player and enemy and make them scriptable - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), 15) - self.__boardFields.append(BoardField("EnemyDeck", "Enemy", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0))) - - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), (self.__cardHeight + 25)) - self.__boardFields.append(BoardField("EnemyGraveyard", "Enemy", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (0,255,0))) + pRow1Height = ((2 * self.__cardHeight) + 60) + pRow2Height = ((2 * self.__cardHeight) + self.__cardHeight + 70) + eRow1Height = 15 + eRow2Height = (self.__cardHeight + 25) - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), ((2 * self.__cardHeight) + 60)) - self.__boardFields.append(BoardField("PlayerDeck", "Player", "Deck", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0))) - - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), ((2 * self.__cardHeight) + self.__cardHeight + 70)) - self.__boardFields.append(BoardField("PlayerGraveyard", "Player", "Grave", pVector, (self.__cardWidth, self.__cardHeight), (255,0,0))) + + eDeckPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), 15) + eGravePos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 0)), (self.__cardHeight + 25)) + pGravePos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), pRow1Height) + pDeckPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * 5)), pRow2Height) + + self.__boardFields.append(BoardField("EnemyDeck", "Enemy", "Deck", eDeckPos, (self.__cardWidth, self.__cardHeight), (0,255,0))) + self.__boardFields.append(BoardField("EnemyGraveyard", "Enemy", "Grave", eGravePos, (self.__cardWidth, self.__cardHeight), (0,255,0))) + self.__boardFields.append(BoardField("PlayerDeck", "Player", "Deck", pDeckPos, (self.__cardWidth, self.__cardHeight), (255,0,0))) + self.__boardFields.append(BoardField("PlayerGraveyard", "Player", "Grave", pGravePos, (self.__cardWidth, self.__cardHeight), (255,0,200))) for i in range(5): - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), ((2 * self.__cardHeight) + 60)) - self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "Player", "MonsterField",pVector,(self.__cardWidth, self.__cardHeight),(255,255,255))) - - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), ((2 * self.__cardHeight) + self.__cardHeight + 70)) - self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "Player", "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255))) - - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1)), 15), (self.__cardWidth, self.__cardHeight)) - self.__boardFields.append(BoardField("EnemyMonsterField-"+str(i), "Enemy", "MonsterField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255))) - - pVector = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1))), (self.__cardHeight + 25)) - self.__boardFields.append(BoardField("EnemySpellTrapField-"+str(i), "Enemy", "EffectField", pVector, (self.__cardWidth, self.__cardHeight), (255,255,255))) - + pMonsterPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), pRow1Height) + pEffectPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * i)), pRow2Height) + eMonsterPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1)), eRow1Height)) + eEffectPos = pygame.Vector2((self.__cardOffset + ((self.__cardWidth + 10) * (i+1))), eRow2Height) + + self.__boardFields.append(BoardField("PlayerMonsterField-"+str(i), "Player", "MonsterField", pMonsterPos, (self.__cardWidth, self.__cardHeight), (255,255,255))) + self.__boardFields.append(BoardField("PlayerEffectField-"+str(i), "Player", "EffectField", pEffectPos, (self.__cardWidth, self.__cardHeight), (255,255,255))) + self.__boardFields.append(BoardField("EnemyMonsterField-"+str(i), "Enemy", "MonsterField", eMonsterPos, (self.__cardWidth, self.__cardHeight), (255,255,255))) + self.__boardFields.append(BoardField("EnemySpellTrapField-"+str(i), "Enemy", "EffectField", eEffectPos, (self.__cardWidth, self.__cardHeight), (255,255,255))) + pass def getBoardFields(self) -> list: return self.__boardFields diff --git a/Game_Client/Classes/Objects/__pycache__/World.cpython-311.pyc b/Game_Client/Classes/Objects/__pycache__/World.cpython-311.pyc index e0a6152..c934dd5 100644 Binary files a/Game_Client/Classes/Objects/__pycache__/World.cpython-311.pyc and b/Game_Client/Classes/Objects/__pycache__/World.cpython-311.pyc differ diff --git a/Game_Client/Classes/System/App.py b/Game_Client/Classes/System/App.py index 8e83619..6af8407 100644 --- a/Game_Client/Classes/System/App.py +++ b/Game_Client/Classes/System/App.py @@ -33,7 +33,7 @@ class App: # create sprite groups self.cards = pygame.sprite.Group() - testMonsterCard = MonsterCard(pygame.Vector2(500,500), "Assets/Cards/MonsterCards/testmonstercard/", self.__inputHandler) + testMonsterCard = MonsterCard(pygame.Vector2(500, 850), "Assets/Cards/MonsterCards/testmonstercard/", self.__inputHandler) self.cards.add(testMonsterCard) while self.__running: diff --git a/Game_Client/Classes/System/__pycache__/App.cpython-311.pyc b/Game_Client/Classes/System/__pycache__/App.cpython-311.pyc index 355ac30..460e4e3 100644 Binary files a/Game_Client/Classes/System/__pycache__/App.cpython-311.pyc and b/Game_Client/Classes/System/__pycache__/App.cpython-311.pyc differ