public void MarkFieldsToAttack(bool attackType) { StartAttackEvent?.Invoke(attackType ? true : false, attackType ? false : true); if (move == 2) { Console.WriteLine("Marking fields"); this.attackType = attackType; move = 3; cordsMarkedToPossibleAttack = PAt(movedPawn).MarkFieldsToAttack(cordsMarkedToAttackRange, A, attackType); } }
private void ShowAtttack(Cord C) { bool primaryAttackEnable = PAt(C).IsSomeoneToAttack(C, A, true); bool skillAttackEnable = PAt(C).IsSomeoneToAttack(C, A, false); if (primaryAttackEnable || skillAttackEnable) //can attack { Console.WriteLine("Moved pawn can attack"); } else //cannot attack { Console.WriteLine("Moved pawn cannot attack anyone"); OnlyCanEnd?.Invoke(true); } StartAttackEvent?.Invoke(primaryAttackEnable, skillAttackEnable); }
public void StartAttack() { StartAttackEvent?.Invoke(); }