Exemplo n.º 1
0
    private void Awake()
    {
        _deck = new GameTileDeck();

        _playerHand = new GameTileGroup();

        for (int i = 0; i < 14; i++)
        {
            _playerHand.AddGameTile(_deck.GetRandomTile());
        }

        //_playerHand.SortByNumber();

        _colorArrange  = new GameTileSameColorArranger(_deck.OkeyTile).Arrange(_playerHand);
        _numberArrange = new GameTileSameNumberArranger(_deck.OkeyTile).Arrange(_playerHand);
        _smartArrange  = new GameTileSmartArranger(_deck.OkeyTile).Arrange(_playerHand);
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            _deck = new GameTileDeck();

            _playerHand = new GameTileGroup();

            for (int i = 0; i < 14; i++)
            {
                _playerHand.AddGameTile(_deck.GetRandomTile());
            }

            //_playerHand.SortByNumber();

            _colorArrange  = new GameTileSameColorArranger(_deck.OkeyTile).Arrange(_playerHand);
            _numberArrange = new GameTileSameNumberArranger(_deck.OkeyTile).Arrange(_playerHand);
            _smartArrange  = new GameTileSmartArranger(_deck.OkeyTile).Arrange(_playerHand);
        }
    }