private static void Showbanner() { int left = Console.WindowWidth / 3; int top = Console.WindowHeight / 2; PrintAtPosition.Print(left, top, "Welcome to the game : PingPong."); PrintAtPosition.Print(left, top++, "The first who scores 3 points wins."); PrintAtPosition.Print(left, top++, "Contorls:"); PrintAtPosition.Print(left, top++, "Move up : W"); PrintAtPosition.Print(left, top++, "Move down : S"); Console.ReadKey(); }
public static bool Determine(PlayerInformation.Player a, PlayerInformation.Player b) { int left = Console.WindowWidth / 3; int top = Console.WindowHeight / 2; if (a.score == 3) { PrintAtPosition.Print(left, top, "First player wins"); return(true); } else if (b.score == 3) { PrintAtPosition.Print(left, top, "Second player wins"); return(true); } return(false); }