Exemplo n.º 1
0
 //Adds a discarded tile to the pond
 public void Add(Tile tile)
 {
     Tiles.Add(tile);
     //Arrange in pond
     tile.Renderer.Position    = GetNextPosition();
     tile.Renderer.Orientation = Orientation;
     tile.SetVisibility(TileVisibility.FaceUp);
     //Set static information accessors
     MostRecentDiscard = tile;
     MostRecentKawa    = this;
 }
Exemplo n.º 2
0
 //Removes the first occurring matching tile from the hand and sets it as a recent discard
 public void RemoveDiscard(Tile tile, Kawa kawa, int accessKey = 0)
 {
     if (accessKey != _accessKey && _accessKey != 0)
     {
         return;
     }
     Tiles.Remove(tile, _accessKey);
     Discard = tile;
     tile.ReleaseOwnership(_accessKey);
     tile.StolenFrom = PlayerNumber;
     kawa.Add(Discard); //TODO: revisit when kawa is refactored to use Tile instead of GameObject
     EventManager.FlagEvent("Hand " + PlayerNumber + " Discard");
 }
Exemplo n.º 3
0
        //Gives a hand to the player to set the references and access key
        public override void Setup(int playerNumber, Hand h, Kawa k, GameController control, GameBoard gameBoard)
        {
            //Debug.Log("Setting up User Player " + playerNumber);
            //accessKey = Security.AccessKeyHash(Security.GetRandomAccessKey());
            hand         = h;
            kawa         = k;
            board        = gameBoard;
            controller   = control;
            PlayerNumber = playerNumber;
            hand.SetOwner(accessKey);
            hand.PlayerNumber = playerNumber;

            InitializeStateMachine();
            handAnalyzer = new HandAnalyzer(hand, accessKey);
        }
Exemplo n.º 4
0
 //Gives a hand to the player to set the references and access key
 public abstract void Setup(int playerNumber, Hand h, Kawa k, GameController control, GameBoard gameBoard);