Combinatorial Game Theory/Game of NIM/gameNIM.c
// A C function that returns True if game has ended and 
// False if game is not yet over 
A C function that returns True if game has ended and
False if game is not yet over
A C function that returns True if game has ended and False if game is not yet over
bool gameOver(int piles[], int n) 
{ 
    int i; 
    for (i=0; i<n; i++) 
        if (piles[i]!=0) 
            return (false); 
    return (true); 
}
bool gameOver ( int piles [ ] , int n ) { int i ; for ( i = 0 ; i < n ; i ++ ) if ( piles [ i ] != 0 ) return ( false ) ; return ( true ) ; }
A C function that returns True if game has ended and
False if game is not yet over
A C function that returns True if game has ended and False if game is not yet over