pushing befor major changes

This commit is contained in:
2025-12-20 15:07:58 -07:00
parent 057164122a
commit f4c5ba1f14
31 changed files with 438 additions and 1502 deletions
+12
View File
@@ -62,6 +62,18 @@ class Game
@players.delete_at(idx)
end
# Finds if a player is in this game
#
# @return [Boolean]
def find_player(player_name)
@players.each do |player|
if player.name == player_name
return true
end
end
return false
end
# Checks if the given id matches a player in the game. Returns the player if
# so. otherwise raises an error.
#