Ejemplo n.º 1
0
        private void setup()
        {
            _revisionnumber = 0;

            for (int i = 0; i < IsBought.Length; i++)
            {
                IsBought[i] = false;
            }
            for (int i = 0; i < Ownership.Length; i++)
            {
                Ownership[i] = null;
            }
            ActivePlayer     = ReturnPlayerByOrder(0).MyPlayer;
            ActiveGamePlayer = 0;
            GameFunctions.randomStarterDie(this);
            PropertyTradeRequested = 0;
            PlayerTradeRequested   = null;
            PropertyTradeDirection = GameFunctions.Direction.nulled;
            _setupComplete         = true;
        }
Ejemplo n.º 2
0
        //need ID of the property the player wants to build a house on, call results in no action if property is morguage, player doesn't have a full set or house level is already at 5
        public void BuyHouse(Player P, byte PropertyID)
        {
            GamePlayer gplayer = publicState.ReturnPlayerByBasePlayer(P);

            GameFunctions.BuyHouse(gplayer, PropertyID);
        }
Ejemplo n.º 3
0
 //Requested Player Rejects trade (opposite of AcceptTrade())
 public void RejectTrade()
 {
     GameFunctions.TradeRejected(this.publicState);
 }
Ejemplo n.º 4
0
 //Requested Player Accepts Trade (needs clientside check for Publicstate.PlayerTradeRequested)
 public void AcceptTrade()
 {
     GameFunctions.TradeAccepted(this.publicState);
 }
Ejemplo n.º 5
0
 //Tradepartner = other player :: PropertyId is 0 - 27 byte value in housecarddatabase :: Dir = direction of trade True= In False=Out
 public void RequestTrade(Player TradePartner, byte PropertyID, bool Dir)
 {
     GameFunctions.TradeRequested(this.publicState, TradePartner, PropertyID, Dir);
 }
Ejemplo n.º 6
0
 //to be called when player ends turn
 public void Turnchange()
 {
     GameFunctions.ChangeActivePlayer(this.publicState);
 }
Ejemplo n.º 7
0
 //1st call enables morguage, second call pays it back bind to same button or different
 public void MorguageToggle(Player P, int ID)
 {
     GameFunctions.ToggleMorguage(P, this.publicState, ID);
 }
Ejemplo n.º 8
0
 //Attempts to buy the tile the active player is occupying, call results in no action if State.Enablebuy == false
 public void BuyActiveTile()
 {
     GameFunctions.BuyPropertyFromBank(this.publicState);
 }
Ejemplo n.º 9
0
 //Small check to test if the calling player is active
 public bool ActiveTest(Player testPlayer)
 {
     return(GameFunctions.IsActivePlayer(testPlayer, this.publicState));
 }
Ejemplo n.º 10
0
 //Call handles dice throw and immediate unavoidable effects (paying rent, taking cards, jail) Manual Purchase required
 public void Dice()
 {
     GameFunctions.castPlayerDie(publicState.ReturnPlayerByOrder(publicState.ActiveGamePlayer), this);
 }
Ejemplo n.º 11
0
 //Player leaves the game
 public void Quit(Player P)
 {
     GameFunctions.LeaveGame(publicState.ReturnPlayerByBasePlayer(P));
 }
Ejemplo n.º 12
0
 //Player draws a communal card with the choice between payment and picking a chance card: True equals chance chosen only if GameState.ChanceChoice is true
 public void ChanceCardChoice(bool choice, Player P)
 {
     GameFunctions.CardChoiceChance(choice, publicState.ReturnPlayerByBasePlayer(P));
 }
Ejemplo n.º 13
0
 //Player escapes prison manually, needs button prompt. Bool equals false if player has escape from jail card
 public void EscapePrison(Player P, bool payed = true)
 {
     GameFunctions.PrisonRelease(publicState.ReturnPlayerByBasePlayer(P), payed);
 }