Open Arcath opened 6 years ago
I don't think a predefined selection of rooms and room objects (like creeps) is a good idea, as tests might want to check for different environments. Simple functions to create proper instances of them sounds like a good idea though. I'm going to give this another thought and come back with some ideas.
I'm repeating myself in a few packages with my stubbings which isn't really necessary.
If we create
@open-screeps\tests-stub
it could provide:creep1
which has:fatigue
: 1carry.energy
: 100carry.power
: 200spawning
: truemove()
alwayrs returns ERR_TIREDgetLinearDistance
It would then be usable by players to do testing in their own AI and us in open-screeps packages.