|
|
@ -34,12 +34,9 @@ func (m *Move) exec(r *room, p *player, seq int) result {
|
|
|
|
return result{reply: wire.Errorf("target cell (%d, %d) is occupied", target[0], target[1])}
|
|
|
|
return result{reply: wire.Errorf("target cell (%d, %d) is occupied", target[0], target[1])}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p.entity.Position = target
|
|
|
|
p.entity.Position = target
|
|
|
|
return result{reply: wire.OK{}}
|
|
|
|
return result{reply: p.entity, announce: p.entity}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// type pawn struct {
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SpawnPlayer is a request to spawn a player
|
|
|
|
// SpawnPlayer is a request to spawn a player
|
|
|
|
type SpawnPlayer struct {
|
|
|
|
type SpawnPlayer struct {
|
|
|
|
Outbox chan wire.Response
|
|
|
|
Outbox chan wire.Response
|
|
|
|