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); }
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)); }
public void notifyUnitPlacement(Unit unit, int apparentType, int col, int row) { send(Message.Create(MessageType.SV_UNIT_PLACED, unit.id, apparentType, col, row)); }
public void revealUnit(Unit unit) { send(Message.Create(MessageType.SV_UNIT_REVEALED, unit.id, unit.type)); }
public void notifyUnitMovement(Unit unit, int newCol, int newRow) { send(Message.Create(MessageType.SV_UNIT_MOVED, unit.id, newCol, newRow)); }