evolve4src/src/evolve_simulator/player.cpp
void Player_Remove(UNIVERSE *u)
{
	PLAYER *player;

	ASSERT( u != NULL );
	ASSERT( u->player != NULL );
	ASSERT( u->player->terminated == 0 );

	player = u->player;
	u->player = NULL;

	if( player->energy > 0 ) {
		Grid_SetOrganic(u, player->x, player->y, player->energy);
	} else {
		Grid_Clear(u, player->x, player->y);
	}
	Player_delete(player);
}
/*
 * Remove player from universe simulation object. All energy for player
 * is converted to organic energy in the form
 * of a white square at the current location of
 * the player.
 *
 */
Remove player from universe simulation object. All energy for player
is converted to organic energy in the form
of a white square at the current location of
the player.
Remove player from universe simulation object . All energy for player is converted to organic energy in the form of a white square at the current location of the player .
void Player_Remove(UNIVERSE *u)
{
	PLAYER *player;
	ASSERT( u != NULL );
	ASSERT( u->player != NULL );
	ASSERT( u->player->terminated == 0 );
	player = u->player;
	u->player = NULL;
	if( player->energy > 0 ) {
		Grid_SetOrganic(u, player->x, player->y, player->energy);
	} else {
		Grid_Clear(u, player->x, player->y);
	}
	Player_delete(player);
}
void Player_Remove ( UNIVERSE * u ) { PLAYER * player ; ASSERT ( u != NULL ) ; ASSERT ( u -> player != NULL ) ; ASSERT ( u -> player -> terminated == 0 ) ; player = u -> player ; u -> player = NULL ; if ( player -> energy > 0 ) { Grid_SetOrganic ( u , player -> x , player -> y , player -> energy ) ; } else { Grid_Clear ( u , player -> x , player -> y ) ; } Player_delete ( player ) ; }
Remove player from universe simulation object.
Remove player from universe simulation object .