Fixed tests. Need to check for damage from AI code

This commit is contained in:
2026-06-11 16:39:58 -06:00
parent df68358a2e
commit 6d2c2162f0
9 changed files with 149 additions and 78 deletions
+5 -2
View File
@@ -1,14 +1,16 @@
# Nathan Hinton 30 Dec 2025
# Ship file for the game
# Represents a space-faring vessel owned by a player.
# Handles movement and validation of ship creation.
require 'securerandom'
# Load the ships into a constant:
require 'yaml'
# Configuration data for all available ships
SHIP_DATA = File.open('lib/game/data/ships.yaml', 'r') do |fi|
YAML.safe_load(fi.read())
end
# Represents a space-faring vessel owned by a player.
class Ship
attr_reader :owner, :position
@@ -143,5 +145,6 @@ class Ship
end
# Error class for ships
# Represents a space-faring vessel owned by a player.
class ShipError < StandardError
end