public object IsGameOver(IGameInterface game, string connectionid) { Player player; Player looser; if (game.PlayerOne.ConnectionId == connectionid) { player = game.PlayerOne; } else { player = game.PlayerTwo; } if (game.IsWon(game.Board, player)) { looser = game.PlayerOne == player ? game.PlayerTwo : game.PlayerOne; var dict = new Dictionary <string, Player> { { "Winner", player }, { "Looser", looser } }; return(dict); } else if (game.GetAvailableSpots(game.Board).Count() == 0) { return("Draw"); } else { return(game); } }