public static void evaluateLocation(Player player, int roll)
        {
            Tile location = _theBoard[player.Location];

            if (location == Tile.GoToJail) {
                player.sendToJail();
            } else if (location == Tile.LuxuryTax) {
                player.payFlatFee((int)Amounts.LuxuryTax);
            } else if (location == Tile.IncomeTax) {
                UnhandledDebtList.addTaxesDebt(player);
            } else if (location == Tile.Chance) {
                int ChestCard = Card.GetChanceCard(player);
                Irc.Output(Irc.getChannel(), ".chance " + player.Name + " " + ChestCard.ToString());
                Card.RunChanceCard(player);
            } else if (location == Tile.CommunityChest) {
                int card = Card.GetCommunityChestCard(player);
                Irc.Output(Irc.getChannel(), ".communityChest " + player.Name + " " + card.ToString());
                Card.RunCommunityChestCard(player);
            } else if ((location == Tile.FreeParking) || (location == Tile.Jail) || (location == Tile.Go)) {
                return;
            } else {
                TitleDeed titleDeed = Property.getTitleDeed(location);
                if (titleDeed != null) {
                    Player owner = titleDeed.Owner;

                    if (owner == null) {
                        Irc.Output(Irc.getChannel(), ".offer " + player.Name + " " + (int)titleDeed.Name + " " + titleDeed.Cost);
                    } else if (owner != player) {
                        int rent = titleDeed.getRent(roll);
                        if (rent != 0) {
                            player.payPlayer(rent, owner);
                        }
                    }
                }
            }
        }
 public static void RunCommunityChestCard( Player player )
 {
     //the number is generated in the Get function
     switch ( _communityChestCard ) {
         case CommunityChestCards.AdvanceGo: player.moveAndEval(Move.Absolute, (int) Tile.Go); break;
         case CommunityChestCards.BankError: player.addCash(200); break;
         case CommunityChestCards.LifeInsuranceMatures: player.addCash(100); break;
         case CommunityChestCards.DoctorFee: player.payFlatFee(50); break;
         case CommunityChestCards.FromSaleOfStock: player.addCash(45); break;
         case CommunityChestCards.GetOutOfJailCard: GetOutOfJailFreeCard.CommunityChestOwner = player; break;
         case CommunityChestCards.GoJailNoCollect: player.sendToJail(); break;
         case CommunityChestCards.GrandOperaOpening: {
             foreach ( Player otherPlayer in _players ) {
                 if ( otherPlayer != player ) {
                     if ( !otherPlayer.Bankrupt && !player.Bankrupt) {
                         otherPlayer.payPlayer(50, player);
                     }
                 }
             }
         }; break;
         case CommunityChestCards.IncomeTaxRefund: player.addCash(20); break;
         case CommunityChestCards.Inherit: player.addCash(100); break;
         case CommunityChestCards.PayHospital: player.payFlatFee(100); break;
         case CommunityChestCards.ReceiveForServices: player.addCash(25); break;
         case CommunityChestCards.SchoolTax: player.payFlatFee(150); break;
         case CommunityChestCards.SecondPrizeBeautyContest: player.addCash(10); break;
         case CommunityChestCards.StreetRepairs: {
             player.payFlatFee(player.Hotels * 115 + player.Houses * 40);
         }; break;
         case CommunityChestCards.XMASFundMatures: player.addCash(100); break;
     }
 }
        public static void RunChanceCard( Player player )
        {
            int location = 0;
            int move = 0;

            switch ( _chanceCard ) {
                case ChanceCards.AdvanceGo: player.moveAndEval(Move.Absolute, (int) Tile.Go); break;
                case ChanceCards.AdvanceBoardWalk: player.moveAndEval(Move.Absolute, (int) Tile.Boardwalk); break;
                case ChanceCards.AdvanceIllinoisAve: player.moveAndEval(Move.Absolute, (int) Tile.IllinoisAvenue); break;
                case ChanceCards.AdvanceNearestRailroad: {
                        location = player.Location;
                        location %= 10;

                        if ( location < 5 ) {
                            move = 5 - location;
                        } else {
                            move = 15 - location;
                        }

                        player.simpleMove(Move.Relative, move);

                        TitleDeed titleDeed = Property.getTitleDeed((Tile) player.Location);
                        Player railroadOwner = titleDeed.Owner;
                        if ( ( railroadOwner != player ) && ( railroadOwner != null ) ) {
                            //for RailRoad the parameter passed to getRent is ignored
                            player.payPlayer(( (Railroad) titleDeed ).getRent(-1) * 2, railroadOwner);
                        } else if ( railroadOwner == null ) {
                            Irc.Output(Irc.getChannel(), ".offer " + player.Name + " " + (int) titleDeed.Name + " " + titleDeed.Cost);
                        }
                    }; break;
                case ChanceCards.AdvanceNearestRailroad2: {
                        location = player.Location;
                        location %= 10;

                        if ( location < 5 ) {
                            move = 5 - location;
                        } else {
                            move = 15 - location;
                        }

                        player.simpleMove(Move.Relative, move);

                        TitleDeed titleDeed = Property.getTitleDeed((Tile) player.Location);
                        Player railroadOwner = titleDeed.Owner;
                        if ( ( railroadOwner != player ) && ( railroadOwner != null ) ) {
                            //for RailRoad the parameter passed to getRent is ignored
                            player.payPlayer(( (Railroad) titleDeed ).getRent(-1) * 2, railroadOwner);
                        } else if ( railroadOwner == null ) {
                            Irc.Output(Irc.getChannel(), ".offer " + player.Name + " " + (int) titleDeed.Name + " " + titleDeed.Cost);
                        }
                    }; break;
                case ChanceCards.AdvanceNearestUtility: {
                        if ( ( player.Location < (int) Tile.ElectricCompany ) || ( player.Location >= (int) Tile.WaterWorks ) ) {
                            player.simpleMove(Move.Absolute, (int) Tile.ElectricCompany);
                        } else {
                            player.simpleMove(Move.Absolute, (int) Tile.WaterWorks);
                        }

                        TitleDeed titleDeed = Property.getTitleDeed((Tile) player.Location);
                        Player utilityOwner = titleDeed.Owner;
                        if ( ( utilityOwner != player ) && ( utilityOwner != null ) ) {
                            int die1, die2;
                            die1 = Die.Roll();
                            die2 = Die.Roll();

                            player.payPlayer(( (Utility) titleDeed ).getRent(( die1 + die2 ) * 10), utilityOwner);
                        } else if ( utilityOwner == null ) {
                            Irc.Output(Irc.getChannel(), ".offer " + player.Name + " " + (int) titleDeed.Name + " " + titleDeed.Cost);
                        }
                    }; break;
                case ChanceCards.AdvanceStCharles: player.moveAndEval(Move.Absolute, (int) Tile.StCharlesPlace); break;
                case ChanceCards.Back3: player.moveAndEval(Move.Relative, -3); break;
                case ChanceCards.BankDivident: player.addCash(50); break;
                case ChanceCards.BuildingAndLoanMatures: player.addCash(150); break;
                case ChanceCards.ChairmanOfBoard: {
                    foreach ( Player otherPlayer in _players ) {
                        if ( otherPlayer != player ) {
                            if ( !otherPlayer.Bankrupt && !player.Bankrupt) {
                                player.payPlayer(50, otherPlayer);
                            }
                        }
                    }
                }; break;
                case ChanceCards.GeneralRepairs: {
                    player.payFlatFee(player.Hotels * 100 + player.Houses * 25);
                } break;
                case ChanceCards.GetOutOfJailCard: GetOutOfJailFreeCard.ChanceOwner = player; break;
                case ChanceCards.JailNoGo: player.sendToJail(); break;
                case ChanceCards.PoorTax: player.payFlatFee(15); break;
                case ChanceCards.RideOnReading: player.moveAndEval(Move.Absolute, (int)Tile.ReadingRailroad); break;
            }
        }
 private void purchase(Player player, TitleDeed titleDeed)
 {
     if (titleDeed == null) {
         Irc.Output(Irc.getChannel(), ".fail " + player.Name + " Unpurchaseable property.");
     } else if (titleDeed.Owner != null) {
         if (titleDeed.Owner == player) {
             Irc.Output(Irc.getChannel(), ".fail " + player.Name + " You already own " + titleDeed.Name + ".");
         } else {
             Irc.Output(Irc.getChannel(), ".fail " + player.Name + " " + titleDeed.Owner.Name + " already owns " + titleDeed.Name + ".");
         }
     } else {
         if (player.Cash >= titleDeed.Cost) {
             player.payFlatFee(titleDeed.Cost);
             player.addTitleDeed(titleDeed);
             titleDeed.Owner = player;
         } else {
             Irc.Output(Irc.getChannel(), ".fail " + player.Name + " insufficient funds");
         }
     }
 }