Last change
on this file since 366 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
-
Property svn:executable
set to
*
|
File size:
833 bytes
|
Rev | Line | |
---|
[2] | 1 | //
|
---|
| 2 | // Bantumi main module
|
---|
| 3 | //
|
---|
| 4 | //LET OP!!!! Bantumi zetten gaan tegen de klok in
|
---|
| 5 | //
|
---|
| 6 | // op plaats hoog[0] en laag[0] symboliseren de banken
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | #include <iostream>
|
---|
| 10 |
|
---|
| 11 | using namespace std;
|
---|
| 12 |
|
---|
| 13 | const int LENGTH = 4;
|
---|
| 14 |
|
---|
| 15 | int aantalInArray( int testje[] ) {
|
---|
| 16 | int tmpAantal = 0;
|
---|
| 17 | for( int tmp = 1; tmp < LENGTH; tmp++ ) {
|
---|
| 18 | tmpAantal += testje[tmp];
|
---|
| 19 | }
|
---|
| 20 | return( tmpAantal );
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | bool afgelopen(int stapel[], int stapel2[] ) {
|
---|
| 24 | if( ( aantalInArray(stapel) == 0 ) or
|
---|
| 25 | ( aantalInArray(stapel2) == 0 ) ) {
|
---|
| 26 | return( true );
|
---|
| 27 | }
|
---|
| 28 | return( false );
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | //stapel2 is de stapel van de tegenstander
|
---|
| 33 | void doeZet(int stapel[], int stapel2[], int & stapelNummer,
|
---|
| 34 | bool laagAanBeurt ) {
|
---|
| 35 | if(laagAanBeurt) {
|
---|
| 36 |
|
---|
| 37 | }
|
---|
| 38 | else {
|
---|
| 39 |
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | int main( ) {
|
---|
| 44 | int spel1_hoog[LENGTH]= { 0, 3, 3, 3 };
|
---|
| 45 | int spel1_laag[LENGTH]= { 0, 3, 3, 3 };
|
---|
| 46 | doeZet
|
---|
| 47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.