Commit 255921d5 authored by clabby's avatar clabby

Rebase

parent 44a42cc2
...@@ -384,7 +384,7 @@ contract GamePlayer { ...@@ -384,7 +384,7 @@ contract GamePlayer {
if (grandparentIndex == type(uint32).max) { if (grandparentIndex == type(uint32).max) {
// If the parent claim is the root claim, begin by attacking. // If the parent claim is the root claim, begin by attacking.
movePos = parentPos.attack(); movePos = parentPos.move(true);
// Flag the move as an attack. // Flag the move as an attack.
isAttack = true; isAttack = true;
} else { } else {
...@@ -402,10 +402,10 @@ contract GamePlayer { ...@@ -402,10 +402,10 @@ contract GamePlayer {
if (Claim.unwrap(ourParentClaim) != Claim.unwrap(parentClaim)) { if (Claim.unwrap(ourParentClaim) != Claim.unwrap(parentClaim)) {
// Attack parent. // Attack parent.
movePos = parentPos.attack(); movePos = parentPos.move(true);
// If we also disagree with the grandparent, attack it as well. // If we also disagree with the grandparent, attack it as well.
if (Claim.unwrap(ourGrandparentClaim) != Claim.unwrap(grandparentClaim)) { if (Claim.unwrap(ourGrandparentClaim) != Claim.unwrap(grandparentClaim)) {
movePos2 = grandparentPos.attack(); movePos2 = grandparentPos.move(true);
} }
// Flag the move as an attack. // Flag the move as an attack.
...@@ -414,7 +414,7 @@ contract GamePlayer { ...@@ -414,7 +414,7 @@ contract GamePlayer {
Claim.unwrap(ourParentClaim) == Claim.unwrap(parentClaim) && Claim.unwrap(ourParentClaim) == Claim.unwrap(parentClaim) &&
Claim.unwrap(ourGrandparentClaim) == Claim.unwrap(grandparentClaim) Claim.unwrap(ourGrandparentClaim) == Claim.unwrap(grandparentClaim)
) { ) {
movePos = parentPos.defend(); movePos = parentPos.move(false);
} }
} }
...@@ -474,7 +474,7 @@ contract GamePlayer { ...@@ -474,7 +474,7 @@ contract GamePlayer {
// If we have a second move position, attack the grandparent. // If we have a second move position, attack the grandparent.
if (Position.unwrap(movePos2) != 0) { if (Position.unwrap(movePos2) != 0) {
(, , , Position grandparentPos, ) = gameProxy.claimData(grandparentIndex); (, , , Position grandparentPos, ) = gameProxy.claimData(grandparentIndex);
Claim ourGrandparentClaim = claimAt(grandparentPos.attack()); Claim ourGrandparentClaim = claimAt(grandparentPos.move(true));
gameProxy.attack(grandparentIndex, ourGrandparentClaim); gameProxy.attack(grandparentIndex, ourGrandparentClaim);
counterParty.play(claimDataLen() - 1); counterParty.play(claimDataLen() - 1);
......
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