Removed ONLYPUT
This commit is contained in:
parent
4f25f66495
commit
89712fc9dc
8 changed files with 25 additions and 53 deletions
6
logic.c
6
logic.c
|
|
@ -40,25 +40,19 @@ static inline int bottomHeightMask( const int a, const int b ){
|
|||
|
||||
void playMove(
|
||||
board_t *boardptr,
|
||||
#ifndef ONLYPUT
|
||||
const move_t move,
|
||||
#endif /* ! ONLYPUT */
|
||||
const int column
|
||||
){
|
||||
#ifndef ONLYPUT
|
||||
switch( move ){
|
||||
case PUT: // Put a new piece in the board
|
||||
#endif /* ! ONLYPUT */
|
||||
boardptr->column [ column ] |=
|
||||
boardptr->player << boardptr->height [ column ];
|
||||
boardptr->height [ column ]++;
|
||||
#ifndef ONLYPUT
|
||||
break;
|
||||
case POP: // Pop out the lowest and make all above fall down
|
||||
boardptr->column [ column ] >>= 1;
|
||||
boardptr->height [ column ]--;
|
||||
}
|
||||
#endif /* ! ONLYPUT */
|
||||
}
|
||||
|
||||
void calcWins(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue