Expanded move_t type with QUIT and added MOVECOUNT
This commit is contained in:
parent
7bbd877fb5
commit
2d11458586
4 changed files with 16 additions and 3 deletions
|
|
@ -118,9 +118,11 @@ int askColumn(
|
|||
int column;
|
||||
for(;;){
|
||||
switch( move ){
|
||||
case PUT: printf( "Wher player %d put? ", board.player );
|
||||
case PUT: printf( "Wher player %d put? ", board.player );
|
||||
break;
|
||||
case POP: printf( "Wher player %d pop? ", board.player );
|
||||
case POP: printf( "Wher player %d pop? ", board.player );
|
||||
break;
|
||||
default: printf( "Wher player %d do the thing? ", board.player );
|
||||
}
|
||||
printf( "\033[K" ); // clear everything after cursor
|
||||
fflush( stdout );
|
||||
|
|
@ -149,6 +151,9 @@ int askColumn(
|
|||
if( board.height [ column ] != 0 )
|
||||
return column;
|
||||
else printf( "\033[2Apls enter a column that ain't empty" );
|
||||
break;
|
||||
default:
|
||||
return column;
|
||||
}
|
||||
else
|
||||
printf( "\033[2Apls enter valid column" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue