Exemple #1
0
 public void ProcessCommunityChest(DataSet game, ChancesEnum chance, Player current)
 {
     // To Do
 }
Exemple #2
0
        private GameMessage ProcessChance(ChancesEnum chance, Player currentPlayer)
        {
            GameMessage response = new GameMessage();

            switch ( chance )
            {
                case ChancesEnum.AdvancetoGo:
                    currentPlayer.Position = 0;
                    response.opCode = GameEnum.collect;
                    response.amount = 200;
                    break;
                case ChancesEnum.AdvancetoTrafalgarSquare:
                    currentPlayer.Position = 24;
                    break;
                case ChancesEnum.AdvancetonearestUtility:
                    // Not nearest
                    currentPlayer.Position = 12;
                    break;
                case ChancesEnum.AdvancetonearestRailroad:
                    // Not nearest
                    currentPlayer.Position = 29;
                    break;
                case ChancesEnum.AdvancetoWhitehall:
                    currentPlayer.Position = 13;
                    break;
                case ChancesEnum.Bankpaysyoudividend:
                    response.opCode = GameEnum.collect;
                    response.amount = 50;
                    break;
                case ChancesEnum.GetoutofJailfree:
                    break;
                case ChancesEnum.Goback3spaces:
                    currentPlayer.Position -= 3;
                    break;
                case ChancesEnum.GodirectlytoJail:
                    break;
                case ChancesEnum.Makegeneralrepairs:
                    break;
                case ChancesEnum.Paypoortax:
                    response.opCode = GameEnum.pay;
                    response.amount = 15;
                    break;
                case ChancesEnum.AdvancetoKingsCrossStation:
                    break;
                case ChancesEnum.AdvancetoMayfair:
                    break;
                case ChancesEnum.Electedchairman:
                    break;
                case ChancesEnum.Buildingandloanmatures:
                    break;
                default:
                    break;
            }

            response.position = currentPlayer.Position;
            response.playerId = currentPlayer.ID;

            return response;
        }