public static void main(String[] args) {
      final TileTypeConfiguration tileTypeConfiguration = new TileTypeConfiguration();
      TileType whiteTileType = new TileType("white");
      tileTypeConfiguration.put(whiteTileType, loadImage("images/white.png"));
      TileType blackTileType = new TileType("black");
      tileTypeConfiguration.put(blackTileType, loadImage("images/black.png"));

      final TileStateConfiguration tileStateConfiguration = new TileStateConfiguration();
      TileState hoverTileState = new TileState("hover", 0);
      hoverTileState.addValidTileType(whiteTileType);
      hoverTileState.addValidTileType(blackTileType);
      TileState selectedTileState = new TileState("selected", 1);
      selectedTileState.addValidTileType(whiteTileType);
      selectedTileState.addValidTileType(blackTileType);
      tileStateConfiguration.put(hoverTileState, loadImage("images/hover.png"));
      tileStateConfiguration.put(selectedTileState, loadImage("images/selected.png"));

      final UnitTypeConfiguration<ChessUnitType> unitTypeConfiguration = new UnitTypeConfiguration<ChessUnitType>();
      unitTypeConfiguration.put(ChessUnitType.WHITE_KING, loadImage("images/Chess_klt45.png"));
      unitTypeConfiguration.put(ChessUnitType.WHITE_QUEEN, loadImage("images/Chess_qlt45.png"));
      unitTypeConfiguration.put(ChessUnitType.WHITE_JACK, loadImage("images/Chess_blt45.png"));
      unitTypeConfiguration.put(ChessUnitType.WHITE_HORSE, loadImage("images/Chess_nlt45.png"));
      unitTypeConfiguration.put(ChessUnitType.WHITE_TOWER, loadImage("images/Chess_rlt45.png"));
      unitTypeConfiguration.put(ChessUnitType.WHITE_PEON, loadImage("images/Chess_plt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_KING, loadImage("images/Chess_kdt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_QUEEN, loadImage("images/Chess_qdt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_JACK, loadImage("images/Chess_bdt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_HORSE, loadImage("images/Chess_ndt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_TOWER, loadImage("images/Chess_rdt45.png"));
      unitTypeConfiguration.put(ChessUnitType.BLACK_PEON, loadImage("images/Chess_pdt45.png"));

      PlayerConfiguration playerConfiguration = new PlayerConfiguration();
      playerConfiguration.add(new Player("white"));
      playerConfiguration.add(new Player("black"));

      BoardConfiguration<ChessUnitType> boardConfiguration = new BoardConfiguration<ChessUnitType>(
              tileTypeConfiguration, unitTypeConfiguration, tileStateConfiguration, playerConfiguration,
              new BoardDimension(8, 8)) {

         @Override
         public List<TileType> getLayout() {
            ArrayList<TileType> result = new ArrayList<TileType>();
            TileType black = tileTypeConfiguration.getTypeFromKey("black");
            TileType white = tileTypeConfiguration.getTypeFromKey("white");
            for (int i = 1; i <= 8; i++) {
               for (int j = 1; j <= 8; j++) {
                  if (i % 2 == 0 && j % 2 != 0) {
                     result.add(black);
                  } else if (i % 2 != 0 && j % 2 == 0) {
                     result.add(black);
                  } else {
                     result.add(white);
                  }
               }
            }
            return result;
         }

         @Override
         public Map<Position, List<Unit>> getStartingUnits() {
            HashMap<Position, List<Unit>> map = new HashMap<Position, List<Unit>>();

            map.put(new Position(0, 0), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_TOWER));
            map.put(new Position(0, 1), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_HORSE));
            map.put(new Position(0, 2), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_JACK));
            map.put(new Position(0, 3), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_KING));
            map.put(new Position(0, 4), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_QUEEN));
            map.put(new Position(0, 5), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_JACK));
            map.put(new Position(0, 6), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_HORSE));
            map.put(new Position(0, 7), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_TOWER));
            map.put(new Position(1, 0), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 1), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 2), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 3), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 4), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 5), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 6), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));
            map.put(new Position(1, 7), createUnitsListFromChessUnitTypes("black", ChessUnitType.BLACK_PEON));

            map.put(new Position(7, 0), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_TOWER));
            map.put(new Position(7, 1), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_HORSE));
            map.put(new Position(7, 2), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_JACK));
            map.put(new Position(7, 3), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_KING));
            map.put(new Position(7, 4), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_QUEEN));
            map.put(new Position(7, 5), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_JACK));
            map.put(new Position(7, 6), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_HORSE));
            map.put(new Position(7, 7), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_TOWER));
            map.put(new Position(6, 0), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 1), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 2), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 3), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 4), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 5), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 6), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));
            map.put(new Position(6, 7), createUnitsListFromChessUnitTypes("white", ChessUnitType.WHITE_PEON));

            return map;
         }

         private List<Unit> combineUnitLists(List<Unit>... lists) {
            List<Unit> result = new ArrayList<Unit>();
            for (List<Unit> units : lists) {
               result.addAll(units);
            }
            return result;
         }

         private List<Unit> createUnitsListFromChessUnitTypes(String playerKey, ChessUnitType... chessUnitTypes) {
            ArrayList<Unit> list = new ArrayList<Unit>();
            for (ChessUnitType chessUnitType : chessUnitTypes) {
               BoardDirection direction = chessUnitType.getKey()
                       .contains("white") ? BoardDirection.NORTH : BoardDirection.SOUTH;
               list.add(new Unit<ChessUnitType>(getPlayerConfiguration().getPlayerFromKey(playerKey), direction,
                       (ChessUnitType) getUnitTypeConfiguration()
                               .getUnitTypeFromKey(chessUnitType.getKey())));
            }
            return list;
         }
      };

      BoardFactory boardFactory = new BoardFactory<ChessUnitType>(boardConfiguration);
      Board board = boardFactory.generateBoardFromConfiguration();
      Game game = new Game(new ChessMovementStrategy(), board);
      JFrame frame = new JFrame();
      BoardPanel boardPanel = new BoardPanel(frame, game, unitTypeConfiguration, tileTypeConfiguration, tileStateConfiguration,
              new ChessMovementStrategy(), UnitSelectorMode.SINGLE, new ChessBattleStrategyConfiguration());
      boardPanel.setPreferredSize(new Dimension(600, 600));
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.add(boardPanel);
      frame.pack();
      frame.setVisible(true);
   }