From 0773e9470b58d1d3014f15c382c68ad69ede82ff Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Wed, 10 Nov 2010 19:32:37 +0000 Subject: [PATCH] seperated a varible that determined the amount of sliding of cards based on how many noncreatures and nonland cards you had. what this change does is this. if i have 20 enchantments on the battlefield Ai's creatures and lands no longer slide to the right. and vice versa. made no sense that if the other player had no artifacts/enchantments that HIS lands and creatures would slide simply because the OTHER player had artifacts/enchantments. --- projects/mtg/src/GuiPlay.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index e6499d637..f61ffe8ba 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -166,12 +166,16 @@ void GuiPlay::Replace() else opponentSpells.Enstack(*it); } - float x = 24 + MAX(opponentSpells.nextX(), selfSpells.nextX()); + float x = 24 + opponentSpells.nextX(); +//seperated the varible X into 2 different varibles. There are 2 players here!! +//we should not be using a single varible to determine the positioning of cards!! + float myx = 24 + selfSpells.nextX(); opponentLands.reset(opponentLandsN, x, 50); opponentCreatures.reset(opponentCreaturesN, x, 95); - battleField.reset(x, 145); - selfCreatures.reset(selfCreaturesN, x, 195); - selfLands.reset(selfLandsN, x, 240); + battleField.reset(x, 145);//what does this varible do? i can comment it out with no reprocussions...is this being double handled? + selfCreatures.reset(selfCreaturesN, myx, 195); + selfLands.reset(selfLandsN, myx, 240); + for (iterator it = end_spells; it != cards.end(); ++it) {