Exemplo n.º 1
0
        public bool attack(Unit enemy)
        {
            if(this.type == 1 && enemy.type == 6) {
                return true;
            }

            if(this.type == 6 && enemy.type == 1) {
                return false;
            }

            return (this.type >= enemy.type);
        }
Exemplo n.º 2
0
 public void showCombatScreen(Unit playerUnit, Unit opponentUnit, bool isWinner, bool isTie)
 {
     send(Message.Create(MessageType.SV_COMBAT_SCREEN, playerUnit.id, opponentUnit.id, opponentUnit.type, isWinner, isTie));
 }
Exemplo n.º 3
0
 public void notifyUnitPlacement(Unit unit, int apparentType, int col, int row)
 {
     send(Message.Create(MessageType.SV_UNIT_PLACED, unit.id, apparentType, col, row));
 }
Exemplo n.º 4
0
 public void revealUnit(Unit unit)
 {
     send(Message.Create(MessageType.SV_UNIT_REVEALED, unit.id, unit.type));
 }
Exemplo n.º 5
0
 public void notifyUnitMovement(Unit unit, int newCol, int newRow)
 {
     send(Message.Create(MessageType.SV_UNIT_MOVED, unit.id, newCol, newRow));
 }