Пример #1
0
 public ThiefPlayer(int id, Point startingPosition)
 {
     ID = id;
     Piece = new Thief(id, startingPosition);
 }
Пример #2
0
 private void attemptToRobPos(Thief t, Point pt)
 {
     Block b = State.Board[pt];
     if (logicEngine.isRobableBlock(State.Board[pt]))
     {
         if ((b.Type == BlockType.Bank || b.Type == BlockType.TravelAgency) && ((Bank)b).Money > 0) ruleEngine.robBank(t, (Bank)b);
         t.Arrestable = true;
     }
 }
Пример #3
0
 private void makeArrest(Piece police, Thief thief)
 {
     State.PolicePlayer.Money += ruleEngine.arrest(thief, police);
     if (thief.ArrestCount == RuleEngine.MAX_ARRESTS)
     {
         ruleEngine.removePieceFromGame(police);
         ruleEngine.removePieceFromGame(thief);
     }
 }
Пример #4
0
        private static XElement XmlThiefPiece(Thief t)
        {
            XElement tp = XmlPiece(t);
            tp.Add(new XElement("Arrestable", t.Arrestable));
            tp.Add(new XElement("Money", t.Money));
            tp.Add(new XElement("ArrestTurns", t.ArrestTurns));
            tp.Add(new XElement("ArrestCount", t.ArrestCount));
            tp.Add(XmlHiddenMoney(t.HiddenMoney));

            return tp;
        }