|
@ -24,9 +24,9 @@ class MapTest { |
|
|
// act |
|
|
// act |
|
|
Map testMap = new Map(mapTest); |
|
|
Map testMap = new Map(mapTest); |
|
|
|
|
|
|
|
|
String topLeft = testMap.cells[0][0].type; |
|
|
|
|
|
|
|
|
String topLeft = testMap.cells[0][2].type; |
|
|
String middle = testMap.cells[1][1].type; |
|
|
String middle = testMap.cells[1][1].type; |
|
|
String bottomRight = testMap.cells[2][2].type; |
|
|
|
|
|
|
|
|
String bottomRight = testMap.cells[2][0].type; |
|
|
// assert |
|
|
// assert |
|
|
assertThat(expectedTopLeft).isEqualTo(topLeft); |
|
|
assertThat(expectedTopLeft).isEqualTo(topLeft); |
|
|
assertThat(expectedMiddle).isEqualTo(middle); |
|
|
assertThat(expectedMiddle).isEqualTo(middle); |
|
@ -42,13 +42,13 @@ class MapTest { |
|
|
"ee." |
|
|
"ee." |
|
|
}; |
|
|
}; |
|
|
Map testMap = new Map(mapTest); |
|
|
Map testMap = new Map(mapTest); |
|
|
Cell expectedTopLeft = testMap.cells[0][0]; |
|
|
|
|
|
|
|
|
Cell expectedTopLeft = testMap.cells[0][2]; |
|
|
Cell expectedMiddle = testMap.cells[1][1]; |
|
|
Cell expectedMiddle = testMap.cells[1][1]; |
|
|
Cell expectedBottomRight = testMap.cells[2][2]; |
|
|
|
|
|
|
|
|
Cell expectedBottomRight = testMap.cells[2][0]; |
|
|
// act |
|
|
// act |
|
|
Cell topLeft = testMap.GetCell(new Vector2(0, 0)); |
|
|
|
|
|
|
|
|
Cell topLeft = testMap.GetCell(new Vector2(0, 2)); |
|
|
Cell middle = testMap.GetCell(new Vector2(1, 1)); |
|
|
Cell middle = testMap.GetCell(new Vector2(1, 1)); |
|
|
Cell bottomRight = testMap.GetCell(new Vector2(2, 2)); |
|
|
|
|
|
|
|
|
Cell bottomRight = testMap.GetCell(new Vector2(2, 0)); |
|
|
// assert |
|
|
// assert |
|
|
assertThat(expectedTopLeft).isEqualTo(topLeft); |
|
|
assertThat(expectedTopLeft).isEqualTo(topLeft); |
|
|
assertThat(expectedMiddle).isEqualTo(middle); |
|
|
assertThat(expectedMiddle).isEqualTo(middle); |
|
|