@@ -79,23 +79,17 @@ class GameRuleLogicTest: StringSpec({
79
79
}
80
80
}
81
81
" Point score calculation works" {
82
- GameRuleLogic .getPointsFromUndeployed(emptySet ()) shouldBe GameRuleLogic .SMALLEST_SCORE_POSSIBLE
82
+ GameRuleLogic .getPointsFromUndeployed(PieceShape .values().toSet ()) shouldBe GameRuleLogic .SMALLEST_SCORE_POSSIBLE
83
83
84
- val fewPieces = listOf(
85
- Piece (Color .BLUE , PieceShape .TRIO_I , Rotation .NONE , true),
86
- Piece (Color .BLUE , PieceShape .TETRO_O , Rotation .NONE , true),
87
- Piece (Color .BLUE , PieceShape .PENTO_P , Rotation .NONE , true),
88
- Piece (Color .BLUE , PieceShape .MONO , Rotation .NONE , true)
84
+ val fewPieces = setOf(
85
+ PieceShape .MONO ,
86
+ PieceShape .PENTO_W ,
87
+ PieceShape .TETRO_I
89
88
)
90
- GameRuleLogic .getPointsFromUndeployed(fewPieces.map{it.kind}.toSet()) shouldBe -76
89
+ GameRuleLogic .getPointsFromUndeployed(fewPieces) shouldBe -10
91
90
92
- val allPieces = PieceShape .shapes.map{
93
- Piece (Color .BLUE , it.key, Rotation .NONE , false)
94
- }.toList()
95
- GameRuleLogic .getPointsFromUndeployed(allPieces.map{it.kind}.toSet(), false) shouldBe 15
96
-
97
- val perfectPieces = allPieces.reversed()
98
- GameRuleLogic .getPointsFromUndeployed(perfectPieces.map{it.kind}.toSet(), true) shouldBe 20
91
+ GameRuleLogic .getPointsFromUndeployed(emptySet(), false) shouldBe 15
92
+ GameRuleLogic .getPointsFromUndeployed(emptySet(), true) shouldBe 20
99
93
}
100
94
" After the color check, PassMoves throw" {
101
95
val state = GameState ()
0 commit comments