public bool MakeMove(User user, string movestr)
        {
            int            playerid = this.users.IndexOf(user);
            MorabarabaMove move     = board.ParseAndValidateMove(playerid, movestr);

            if (move != null)
            {
                bool playerWon = board.MakeMove(playerid, move);
                board.addToHistory(movestr);
                if (playerWon)
                {
                    //Player won
                    MorabarabaController.EndGame(user);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
 private void OnZoneLeave(User user, Zone zone)
 {
     MorabarabaController.DequeueUser(user);
     MorabarabaController.LeaveSession(user);
 }