public void GetPlayersTest() { PlayerDAO dao = new PlayerDAO(); List <Player> players = dao.GetPlayers(); Assert.IsNotNull(players); Assert.IsTrue(players.Count > 0); }
//Método para registrar el usuario y puntaje en la base de datos public static void RegisterPlayer() { foreach (Player user in PlayerDAO.GetPlayers()) { if (user.nickname.Equals(player)) { ScoreDAO.AddScore(scoreBlocks + BonusPoints(), player); return; } } PlayerDAO.InsertPlayer(player); ScoreDAO.AddScore(scoreBlocks + BonusPoints(), player); }
public List <Player> GetPlayers(int userid) { return(playerDAO.GetPlayers(userid)); }