Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void parserTestBegin() {
- startGame("/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w///b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/", true);
- String[][] res = {{"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""}};
- for (int i = 0; i < 10; i++) {
- for (int j = 0; j < 10; j++) {
- assertEquals(game.gameState.data[i][j], res[i][j]);
- }
- }
- }
- @Test
- public void parserTestBeginWithExtraNumbers() {
- startGame("/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w/1234/b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/", true);
- String[][] res = {{"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""}};
- for (int i = 0; i < 10; i++) {
- for (int j = 0; j < 10; j++) {
- assertEquals(game.gameState.data[i][j], res[i][j]);
- }
- }
- }
- @Test
- public void parserTestEmpty() {
- startGame("////////", true);
- String[][] res = {{"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""},
- {"","","","","","","","","",""}};
- for (int i = 0; i < 10; i++) {
- for (int j = 0; j < 10; j++) {
- assertEquals(game.gameState.data[i][j], res[i][j]);
- }
- }
- }
- @Test
- public void parserTestWithCities() {
- startGame("4W5/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w///b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/7B2", true);
- String[][] res = {{"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","","W"},
- {"","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"B","","","","","","w","w","w",""},
- {"","b","b","b","","","","","",""},
- {"","","","","","","w","w","w",""}};
- for (int i = 0; i < 10; i++) {
- for (int j = 0; j < 10; j++) {
- assertEquals(game.gameState.data[i][j], res[i][j]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement