Fixed tests. Need to check for damage from AI code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user