Exemple #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);
        }
Exemple #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));
 }
Exemple #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));
 }
Exemple #4
0
 public void revealUnit(Unit unit)
 {
     send(Message.Create(MessageType.SV_UNIT_REVEALED, unit.id, unit.type));
 }
Exemple #5
0
 public void notifyUnitMovement(Unit unit, int newCol, int newRow)
 {
     send(Message.Create(MessageType.SV_UNIT_MOVED, unit.id, newCol, newRow));
 }