fostrb / robotfight

0 stars 0 forks source link

Controller Structure #6

Open fostrb opened 6 years ago

fostrb commented 6 years ago

Solidify a structure for robot controller code.

Ideally, this will require minimal boilerplate code. Perhaps a single import because sweet sweet IDE functionality.

Controller should be a class held by Robot. Within Controller, robot components (sensors, weapons, etc) are defined, as well as robot Name, color, (if not desired to be random) and other customization things.

Paramount: -Ensure that data such as Rob.position and Rob.hull has limited access so users can't set their hull to forty billion, weapon cooldowns to 0, and spin around in a circle, firing 1kdmg projectiles at mach 3.

For fun: -Hooks on bot loaded, killed another, died, etc.

fostrb commented 6 years ago

RModules shall have a simple way to specify methods and variables that are exposed, which will aid in generating the RModule interface. The main bot controller will utilize a compilation of RModule interfaces (one for each module) to control the bot.