Exemplo n.º 1
0
    /* Determines the action to take if a hex is clicked. */
    public void hexClicked(HexScript hex)
    {
        if (!paused) {

            if (focusedUnit != null) {
                moveCurrentUnit(hex);

            // A space must be adjacent to the current Player's base and not a water tile
            } else if ( focusedCard != null && hex.getType() != HexScript.HexEnum.water &&
                        adjacent_to_base(hex) && placeUnitWithCard(focusedCard, (int)hex.position.x, (int)hex.position.y) ) {
                    // Attempt to place the unit of the focusedCard
                    focusedCard = null;
            }

        }
    }