icfp-model/src/test/java/ru/bosony/tests/TestGame.java
author indvdum (gotoindvdum[at]gmail[dot]com)
Sun, 15 Jul 2012 00:48:47 +0400
changeset 18 735c03e46425
parent 16 4e0d86c1c22a
permissions -rw-r--r--
Moving example maps to special separate class
     1 package ru.bosony.tests;
     2 
     3 import static org.junit.Assert.*;
     4 
     5 import org.junit.Test;
     6 
     7 import ru.bosony.model.game.Game;
     8 import ru.bosony.model.game.GameState;
     9 import ru.bosony.model.maps.ExampleMaps;
    10 import ru.bosony.model.mine.Mine;
    11 
    12 /**
    13  * @author 	indvdum (gotoindvdum[at]gmail[dot]com) <br>
    14  * 			14.07.2012 23:55:07
    15  *
    16  */
    17 public class TestGame {
    18 
    19 	@Test
    20 	public void testMapFromTask() {
    21 		String map = ExampleMaps.MAP_FROM_TASK.getMap();
    22 		Mine mine = new Mine(map);
    23 		Game game = new Game(mine);
    24 		String route = "DDDLLLLLLURRRRRRRRRRRRDDDDDDDLLLLLLLLLLLDDDRRRRRRRRRRRD"; 
    25 		assertEquals(game.move(route), GameState.Win);
    26 	}
    27 
    28 }