Ejemplo n.º 1
0
/* Dumps the given order to the console */
func printOrder(order interfaces.Order) {
	entity := GAME.GetEntityByPlayer(order.GetPlayer())
	log.Printf("Handled Order: command:'%v' tick:%v actions:%v player:%v",
		COMMAND_CODES[order.GetCommandCode()], order.GetTickNumber(),
		entity.GetStringActionQueue(),
		order.GetPlayer().GetPlayerId())
}
Ejemplo n.º 2
0
/* Updates players' ticks and send out gamestate when everyone's ready */
func updateTick(order interfaces.Order) {
	p := order.GetPlayer()
	p.SetLastTick(order.GetTickNumber())
	p.SetLastTickTime(time.Now())
}