Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
255921d5
Commit
255921d5
authored
Jun 21, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebase
parent
44a42cc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
FaultDisputeGame.t.sol
...s/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
+5
-5
No files found.
packages/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
View file @
255921d5
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment