source: liacs/alg/bantumi/trunk/main.cc@ 4

Last change on this file since 4 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
Line 
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
11using namespace std;
12
13const int LENGTH = 4;
14
15int 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
23bool 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
33void doeZet(int stapel[], int stapel2[], int & stapelNummer,
34 bool laagAanBeurt ) {
35 if(laagAanBeurt) {
36
37 }
38 else {
39
40 }
41}
42
43int 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.