public Event.Game.GameCreatedEvent createGame(Event.Game.GameCreateEvent e)
        {
            if (e.getIsCreated())
            {
                this.gameMachine = new GameStateMachine();
                GameDetail detail = GameDetail.fromGameStateMachine(gameMachine);
                return new GameCreatedEvent(detail);
            }
            return GameCreatedEvent.CreateFail();

        }
        public static GameDetail fromGameStateMachine(GameStateMachine gameMachine)
        {
            GameDetail detail = new GameDetail();

            // Convert BoardStateMachine to BoardDetail   
            char[,] cPieces = gameMachine.getBoardMachine().getBoard().serialize();
            BoardDetail boardDetail = new BoardDetail(cPieces);

            // Convert from PlayerStateMachine to PlayerDetail
            PlayerDetail[] playerDetails = new PlayerDetail[2]; // STUB
            playerDetails[0] = new PlayerDetail(gameMachine.getBoardMachine().getPieces(Color.BLACK));
            playerDetails[1] = new PlayerDetail(gameMachine.getBoardMachine().getPieces(Color.RED));

            // Game detail
            detail.boardDetail = boardDetail;
            detail.playerDetails = playerDetails;

            return detail;
        }
 public void newGameMachineTest()
 {
     GameStateMachine machine = new GameStateMachine();
 }