class MockCmdReceiver { constructor(name = 'receiver') { this.name = name this.calls = [] } moveTo(oldPos, newPos) { this.calls.push({ oldPos, newPos }) } execCommand(cmd, oldPos, newPos) { this.calls.push({ cmd, oldPos, newPos }) } get callCount() { return this.calls.length } lastCall() { return this.calls[this.calls.length - 1] } } module.exports = MockCmdReceiver