// Path: src/main/java/pl/joegreen/sergeants/framework/Actions.java
// public interface Actions {
// 
//     void move(int indexFrom, int indexTo);
// 
//     /**
//      * Direct move between fields. Works only if both fields are neighbours (either horizontally or vertically, not diagonally) - otherwise does nothing and logs error.
//      */
//     void move(Field fieldFrom, Field fieldTo);
// 
//     void move(int indexFrom, int indexTo, boolean moveHalf);
// 
//     /**
//      * Direct move between fields. Works only if both fields are neighbours (either horizontally or vertically, not diagonally) - otherwise does nothing and logs error.
//      * @param moveHalf if true, only half of the army will be moved (equal to double click in browser)
//      */
//     void move(Field fieldFrom, Field fieldTo, boolean moveHalf);
// 
//     void sendChat(String message);
// 
//     void sendTeamChat(String message);
// 
//     void leaveGame();
// 
//     void ping(int index);
// 
//     void ping(Field field);
// 
//     /**
//      * Remove all moves from the move queue.
//      */
//     void clearMoves();
// 
//     /**
//      * Get lower level API that potentially can make it possible to do something that is not possible by this interface.
//      * Use with caution, as using it can potentially make the framework work unexpectedly.
//      */
//     GeneralsApi getBareApi();
// }
// 
// Path: src/main/java/pl/joegreen/sergeants/simulator/SimulatorConfiguration.java
// public static SimulatorConfiguration configuration() {
//     return new SimulatorConfiguration();
// }


import org.junit.Assert;
import org.junit.Test;
import pl.joegreen.sergeants.framework.Actions;
import pl.joegreen.sergeants.framework.model.*;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static pl.joegreen.sergeants.simulator.SimulatorConfiguration.configuration;
package pl.joegreen.sergeants.simulator;





public class SimulatorFullGameTest {

    @Test
    public void testFullGame() {
        Tile[] tiles = new Tile[]{
                new GeneralTile(0, 0), new CityTile(1, 11), new MountainTile(2),
                new EmptyTile(3), new EmptyTile(4), new EmptyTile(5),
                new EmptyTile(6), new EmptyTile(7), new GeneralTile(8, 1)
        };
        GameMap gameMap = new GameMap(tiles, 3, 3);
        BotInstanceCatcher<AttackGeneralBot> attackGeneralBotProvider = new BotInstanceCatcher<>(AttackGeneralBot::new);
// Path: src/main/java/pl/joegreen/sergeants/framework/Actions.java
// public interface Actions {
// 
//     void move(int indexFrom, int indexTo);
// 
//     /**
//      * Direct move between fields. Works only if both fields are neighbours (either horizontally or vertically, not diagonally) - otherwise does nothing and logs error.
//      */
//     void move(Field fieldFrom, Field fieldTo);
// 
//     void move(int indexFrom, int indexTo, boolean moveHalf);
// 
//     /**
//      * Direct move between fields. Works only if both fields are neighbours (either horizontally or vertically, not diagonally) - otherwise does nothing and logs error.
//      * @param moveHalf if true, only half of the army will be moved (equal to double click in browser)
//      */
//     void move(Field fieldFrom, Field fieldTo, boolean moveHalf);
// 
//     void sendChat(String message);
// 
//     void sendTeamChat(String message);
// 
//     void leaveGame();
// 
//     void ping(int index);
// 
//     void ping(Field field);
// 
//     /**
//      * Remove all moves from the move queue.
//      */
//     void clearMoves();
// 
//     /**
//      * Get lower level API that potentially can make it possible to do something that is not possible by this interface.
//      * Use with caution, as using it can potentially make the framework work unexpectedly.
//      */
//     GeneralsApi getBareApi();
// }
// 
// Path: src/main/java/pl/joegreen/sergeants/simulator/SimulatorConfiguration.java
// public static SimulatorConfiguration configuration() {
//     return new SimulatorConfiguration();
// }


// Path: src/test/java/pl/joegreen/sergeants/simulator/SimulatorFullGameTest.java
import org.junit.Assert;
import org.junit.Test;
import pl.joegreen.sergeants.framework.Actions;
import pl.joegreen.sergeants.framework.model.*;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static pl.joegreen.sergeants.simulator.SimulatorConfiguration.configuration;

package pl.joegreen.sergeants.simulator;





public class SimulatorFullGameTest {

    @Test
    public void testFullGame() {
        Tile[] tiles = new Tile[]{
                new GeneralTile(0, 0), new CityTile(1, 11), new MountainTile(2),
                new EmptyTile(3), new EmptyTile(4), new EmptyTile(5),
                new EmptyTile(6), new EmptyTile(7), new GeneralTile(8, 1)
        };
        GameMap gameMap = new GameMap(tiles, 3, 3);
        BotInstanceCatcher<AttackGeneralBot> attackGeneralBotProvider = new BotInstanceCatcher<>(AttackGeneralBot::new);
        Simulator server = SimulatorFactory.of(gameMap, configuration().withMaxTurns(200), DoSameMoveBot.forMove(0, 3), attackGeneralBotProvider);