public void ToMovePlayer(ref int x, ref int y) { while (!int.TryParse(Console.ReadLine(), out direction)) { output.ShowErrorMessage(); } switch (direction) { case 1: if (x == 1) { break; } else { x -= 1; } break; case 2: if (y == 10) { break; } else { y += 1; } break; case 3: if (x == 10) { break; } else { x += 1; } break; case 5: if (y == 1) { break; } else { y -= 1; } break; case 0: break; } }
public void LoseCondition(ref bool firstСondition, ref bool secondСondition, ref int numericСondition) { Console.Clear(); output.ShowLoseMessage(); while (!int.TryParse(Console.ReadLine(), out numericСondition)) { output.ShowErrorMessage(); } if (numericСondition == buttonForLoseOrWin) { secondСondition = false; firstСondition = true; } else { secondСondition = false; firstСondition = false; } }