base.h
void placeNewTile() {
	if ( getStatus() == 0 ) { // board not full
		unsigned char x, y, i;
		for ( i = 1; i <= 20; i++ ) {
			getRandomCoord( &x, &y );
			if ( !board[x][y] ) {
				 board[x][y] = getRandomTileValue();
				 return;
			}
		}
		for ( y = 0; y <= 3; y++ ) {
			for ( x = 0; x <= 3; x++ ) {
				if ( !board[x][y] ) {
					 board[x][y] = getRandomTileValue();
					 return;
				}
			}
		}
	}
}
/* placeNewTile
   
   Place a new tile on the board.
*/
placeNewTile
Place a new tile on the board.
placeNewTile Place a new tile on the board .
void placeNewTile() {
	if ( getStatus() == 0 ) { 
		unsigned char x, y, i;
		for ( i = 1; i <= 20; i++ ) {
			getRandomCoord( &x, &y );
			if ( !board[x][y] ) {
				 board[x][y] = getRandomTileValue();
				 return;
			}
		}
		for ( y = 0; y <= 3; y++ ) {
			for ( x = 0; x <= 3; x++ ) {
				if ( !board[x][y] ) {
					 board[x][y] = getRandomTileValue();
					 return;
				}
			}
		}
	}
}
void placeNewTile ( ) { if ( getStatus ( ) == 0 ) { unsigned char x , y , i ; for ( i = 1 ; i <= 20 ; i ++ ) { getRandomCoord ( & x , & y ) ; if ( ! board [ x ] [ y ] ) { board [ x ] [ y ] = getRandomTileValue ( ) ; return ; } } for ( y = 0 ; y <= 3 ; y ++ ) { for ( x = 0 ; x <= 3 ; x ++ ) { if ( ! board [ x ] [ y ] ) { board [ x ] [ y ] = getRandomTileValue ( ) ; return ; } } } } }
placeNewTile
Place a new tile on the board.
placeNewTile Place a new tile on the board .
// board not full