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
+6 -2
View File
@@ -1,16 +1,18 @@
# Nathan Hinton Jan 2026
# Game file for the buildings
# Defines a building that can be constructed on a planet.
# Handles resource production and build power generation.
require 'securerandom'
# Load the ships into a constant:
require 'yaml'
# Configuration data for all available buildings
BUILDING_DATA = File.open('lib/game/data/buildings.yaml', 'r') do |fi|
YAML.safe_load(fi.read())
end
# Represents a building constructed on a planet. Provides resources or build power.
class Building
attr_reader :name
@@ -145,9 +147,11 @@ class Building
end
# Error class for the buildings
# Represents a building constructed on a planet. Provides resources or build power.
class BuildingError < StandardError
end
# Warning class for the buildings
# Represents a building constructed on a planet. Provides resources or build power.
class BuildingWarning < StandardError
end