evolve4src/src/evolve_simulator/player.cpp
void Player_Add(UNIVERSE *u, int x, int y)
{
#ifndef NDEBUG
	UNIVERSE_GRID ugrid;
#endif
	PLAYER *player;

	ASSERT( u != NULL );
	ASSERT( u->player == NULL );
	ASSERT( x >= 0 && x < u->width );
	ASSERT( y >= 0 && y < u->height );
	ASSERT( Grid_Get(u, x, y, &ugrid) == GT_BLANK );

	player = Player_make(u, x, y);
	u->player = player;
	Grid_SetPlayer(u, x, y, player);
}
/*
 * Add player to universe. Assumes player does not already exist.
 *
 * x and y are the location
 *
 * Player will be given 0 units of energy.
 *
 * The next player command will be the NOOP.
 *
 * (x, y) must be valid coordinates and not contain anything else.
 *
 */
Add player to universe. Assumes player does not already exist.
x and y are the location

Player will be given 0 units of energy.

The next player command will be the NOOP.

(x, y) must be valid coordinates and not contain anything else.
Add player to universe . Assumes player does not already exist . x and y are the location Player will be given 0 units of energy . The next player command will be the NOOP . ( x y ) must be valid coordinates and not contain anything else .
void Player_Add(UNIVERSE *u, int x, int y)
{
#ifndef NDEBUG
	UNIVERSE_GRID ugrid;
#endif
	PLAYER *player;
	ASSERT( u != NULL );
	ASSERT( u->player == NULL );
	ASSERT( x >= 0 && x < u->width );
	ASSERT( y >= 0 && y < u->height );
	ASSERT( Grid_Get(u, x, y, &ugrid) == GT_BLANK );
	player = Player_make(u, x, y);
	u->player = player;
	Grid_SetPlayer(u, x, y, player);
}
void Player_Add ( UNIVERSE * u , int x , int y ) { #ifndef NDEBUG UNIVERSE_GRID ugrid ; #endif PLAYER * player ; ASSERT ( u != NULL ) ; ASSERT ( u -> player == NULL ) ; ASSERT ( x >= 0 && x < u -> width ) ; ASSERT ( y >= 0 && y < u -> height ) ; ASSERT ( Grid_Get ( u , x , y , & ugrid ) == GT_BLANK ) ; player = Player_make ( u , x , y ) ; u -> player = player ; Grid_SetPlayer ( u , x , y , player ) ; }
Add player to universe.
Add player to universe .