From 855d697572fa1808acad1f70f6e01822e73fa46e Mon Sep 17 00:00:00 2001 From: Alexis DRAI Date: Wed, 28 Sep 2022 19:16:53 +0200 Subject: [PATCH] :adhesive_bandage: Make method static, remove Load PlayGame was never using any instance data, so it could be made static for performance gains --- Sources/Model/Games/GameRunner.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Sources/Model/Games/GameRunner.cs b/Sources/Model/Games/GameRunner.cs index a477c74..8d771f1 100644 --- a/Sources/Model/Games/GameRunner.cs +++ b/Sources/Model/Games/GameRunner.cs @@ -57,17 +57,6 @@ namespace Model.Games } - /// - /// loads a game by name to start playing again - /// - /// name of game to be loaded - /// loaded game - /// - public void LoadGame(string name) - { - Game game = GetOneGameByName(name); - } - /// /// creates a new game /// @@ -87,7 +76,7 @@ namespace Model.Games /// plays one turn of the game /// /// the game from which a turn will be played - public void PlayGame(Game game) + public static void PlayGame(Game game) { Player current = game.GetWhoPlaysNow(); game.PerformTurn(current);