1. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Programming Kalah Rules

I am trying to program the method that allows you to make a move. I am using two 1 dimensional arrays for each player's stores and then just using two ints to store the houses. I was wondering what mechanism I could use to remove all the seeds from one store and then deposit them in sequential stores and houses etc. I tried a for loop, but then realised that there may not be 3 seeds in the store you are emptying? Could I use a while loop instead? any help would be appreciated!

2. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Programming Kalah Rules

I reiterate, this forum is useless!

3. ## Re: Programming Kalah Rules

Originally Posted by Hazza
I reiterate, this forum is useless!

kind regards,

Jos

4. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Programming Kalah Rules

What do you want? An essay?!

5. ## Re: Programming Kalah Rules

Originally Posted by Hazza
What do you want? An essay?!
Nope, just an explanation of what a 'Kalah' is; I guess its a game, but what are 'houses', 'stores', 'seeds'? In general: what are the rules of the game? (if we're talking about a game that is).

kind regards,

Jos

6. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Programming Kalah Rules

Oh sorry I though you were being facetious with me! The best explanation is actually on Wikipedia:

Kalah - Wikipedia, the free encyclopedia

7. ## Re: Programming Kalah Rules

Originally Posted by Hazza
Oh sorry I though you were being facetious with me! The best explanation is actually on Wikipedia:

Kalah - Wikipedia, the free encyclopedia
Got it; nice game b.t.w.; I'd use an array with 14 elements and think of it as a circular array; elements #0 ... #5 are your houses; element #6 is your store; elements #7 ... #12 are your opponents houses and element #13 is your opponents store.

kind regards,

Jos

8. Member
Join Date
Oct 2012
Posts
64
Rep Power
0

## Re: Programming Kalah Rules

Yeah I did what you said and its all great thanks! i am trying to program the rules now! I have used a while loop first of all to say while (seedsinparticularhouse != 0) but am confused about the inner loop(s)?!