#include "game_state.h"

void initialize_game(GameState *state) {
	initialize_player(&state->localPlayer);
	state->remoteCount = 0;
}

void update_game(GameState *state, InputState *input, float delta) {
	update_player_movement(&state->localPlayer, input, delta);

	PlayerNetState netState = {
		.id = 0,
		.position = state->localPlayer.position,
		.velocity = state->localPlayer.velocity,
		.yaw = state->localPlayer.yaw
	};
	send_player_state(&netState);
	receive_remote_players(state->remotePlayers, &state->remoteCount);
}
