Anyway, OOP is your friend.

Jump to navigation Jump to search

Anyway, OOP is your friend.

Good abstractions: Robot, Wave, BattleField

Bad abstractions: Radar, Gun, Wheel

Why? Because once you segment your code into gun & wheel, information sharing gets hard. A large part of wheel & gun can be shared and then you need EnemyHistoryManager etc. A Gun isn't a gun at all, all a gun does is a turret, a bullet plus some powder, and all a wheel does is turning. You don't need a driver or a brain, everything in your code is driver, everything in your code is brain. You just model everything in plain code, no need for extra layer of abstraction.

Xor (talk)16:14, 29 January 2022