-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
324 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
test-framework/src/main/kotlin/edu/austral/dissis/chess/test/TestGame.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package edu.austral.dissis.chess.test | ||
|
||
import edu.austral.dissis.chess.test.game.TestInput | ||
|
||
class TestGame( | ||
val title: String, | ||
val initialBoard: TestBoard, | ||
val movements: List<Pair<TestPosition, TestPosition>>, | ||
val inputs: List<TestInput>, | ||
val testResult: TestGameResult, | ||
val finalBoard: TestBoard | ||
) |
13 changes: 13 additions & 0 deletions
13
test-framework/src/main/kotlin/edu/austral/dissis/chess/test/game/GameInput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package edu.austral.dissis.chess.test.game | ||
|
||
import edu.austral.dissis.chess.test.TestPosition | ||
|
||
sealed interface TestInput { | ||
} | ||
|
||
data class TestMove(val from: TestPosition, val to: TestPosition) : TestInput | ||
|
||
data object Undo : TestInput | ||
|
||
data object Redo : TestInput | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
test-framework/src/main/resources/test_cases/four_redos.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 4 redos | ||
|
||
# Size | ||
width = 8 | ||
height = 8 | ||
|
||
# Starting board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | |WP| | | | | ||
3 | | | | | | | | | | ||
4 | | | | | | | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | |BP| | | | | ||
8 | | | | |BK| | | | | ||
``` | ||
# Moves | ||
1. e2-e3 | ||
2. e7-e6 | ||
3. e3-e4 | ||
4. e6-e5 | ||
5. UNDO | ||
6. UNDO | ||
7. UNDO | ||
8. UNDO | ||
9. REDO | ||
10. REDO | ||
11. REDO | ||
12. REDO | ||
|
||
# Result | ||
`ALL_MOVES_VALID` | ||
|
||
# Final board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | | | | | | | ||
3 | | | | | | | | | | ||
4 | | | | |WP| | | | | ||
5 | | | | |BP| | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` |
39 changes: 39 additions & 0 deletions
39
test-framework/src/main/resources/test_cases/redo_pawn_movement.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Redo Pawn Movement | ||
|
||
# Size | ||
width = 8 | ||
height = 8 | ||
|
||
# Starting board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | |WP| | | | | ||
3 | | | | | | | | | | ||
4 | | | | | | | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` | ||
# Moves | ||
1. e2-e4 | ||
2. UNDO | ||
3. REDO | ||
|
||
|
||
# Result | ||
`ALL_MOVES_VALID` | ||
|
||
# Final board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | | | | | | | ||
3 | | | | | | | | | | ||
4 | | | | |WP| | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` |
38 changes: 38 additions & 0 deletions
38
test-framework/src/main/resources/test_cases/undo_pawn_movement.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Undo Pawn Movement | ||
|
||
# Size | ||
width = 8 | ||
height = 8 | ||
|
||
# Starting board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | |WP| | | | | ||
3 | | | | | | | | | | ||
4 | | | | | | | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` | ||
# Moves | ||
1. e2-e4 | ||
2. UNDO | ||
|
||
|
||
# Result | ||
`ALL_MOVES_VALID` | ||
|
||
# Final board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | |WP| | | | | ||
3 | | | | | | | | | | ||
4 | | | | | | | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` |
40 changes: 40 additions & 0 deletions
40
...-framework/src/main/resources/test_cases/undo_pawn_movement_still_black_turn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Undo pawn movement still white turn | ||
|
||
# Size | ||
width = 8 | ||
height = 8 | ||
|
||
# Starting board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | |WP| | | | | ||
3 | | | | | | | | | | ||
4 | | | | | | | | | | ||
5 | | | | | | | | | | ||
6 | | | | | | | | | | ||
7 | | | | |BP| | | | | ||
8 | | | | |BK| | | | | ||
``` | ||
# Moves | ||
1. e2-e3 | ||
2. e7-e6 | ||
3. UNDO | ||
4. e7-e5 | ||
|
||
|
||
# Result | ||
`ALL_MOVES_VALID` | ||
|
||
# Final board | ||
``` | ||
a b c d e f g h | ||
1 | | | | |WK| | | | | ||
2 | | | | | | | | | | ||
3 | | | | |WP| | | | | ||
4 | | | | | | | | | | ||
5 | | | | |BP| | | | | ||
6 | | | | | | | | | | ||
7 | | | | | | | | | | ||
8 | | | | |BK| | | | | ||
``` |
Oops, something went wrong.