private bool CheckWinCondition() { //check if all disks are not moving and stacked on one rod bool middleRodWinCondition = (middleRod.GetDiskCount() == numberOfDisks) && !middleRod.AreDisksMoving(); bool lastRodWinCondition = (lastRod.GetDiskCount() == numberOfDisks) && !lastRod.AreDisksMoving(); if (middleRodWinCondition || lastRodWinCondition) { return(true); } return(false); }
private bool firstRodHasAllDisks() { return(firstRod.GetDiskCount() == numberOfDisks ? true : false); }