I have a little problem with this code.
Basicly it's a array (I think that's how it's called in english, in french it's tableau, well it's some kind of table for programming that you can put date in..)
Anyhow, I'm doing this Othello game, and I'm quite sure there's an easier way to code this, but I can't seem to find a solution.
Here's the current code :
code:
for ( compteurColonnes = 0 ; compteurColonnes < 10 ; compteurColonnes ++ )
for ( compteurRangees = 0 ; compteurRangees < 10 ; compteurRangees ++)
othellier[compteurColonnes][compteurRangees]= '~' ;
othellier[0][0]= ' ' ;
othellier[0][1]= 'A' ;
othellier[0][2]= 'B' ;
othellier[0][3]= 'C' ;
othellier[0][4]= 'D' ;
othellier[0][5]= 'E' ;
othellier[0][6]= 'F' ;
othellier[0][7]= 'G' ;
othellier[0][8]= 'H' ;
othellier[0][9]= ' ' ;
othellier[9][0]= ' ' ;
othellier[9][1]= 'A' ;
othellier[9][2]= 'B' ;
othellier[9][3]= 'C' ;
othellier[9][4]= 'D' ;
othellier[9][5]= 'E' ;
othellier[9][6]= 'F' ;
othellier[9][7]= 'G' ;
othellier[9][8]= 'H' ;
othellier[9][9]= ' ' ;
othellier[0][0]= ' ' ;
othellier[1][0]= '1' ;
othellier[2][0]= '2' ;
othellier[3][0]= '3' ;
othellier[4][0]= '4' ;
othellier[5][0]= '5' ;
othellier[6][0]= '6' ;
othellier[7][0]= '7' ;
othellier[8][0]= '8' ;
othellier[9][0]= ' ' ;
othellier[0][9]= ' ' ;
othellier[1][9]= '1' ;
othellier[2][9]= '2' ;
othellier[3][9]= '3' ;
othellier[4][9]= '4' ;
othellier[5][9]= '5' ;
othellier[6][9]= '6' ;
othellier[7][9]= '7' ;
othellier[8][9]= '8' ;
othellier[9][9]= ' ' ;
the code is in java, but i think anyone with a little programming skills can understand it
and i have tried making a few "for"s with the numbers.. but the problem is that the array in "char" since I have to represent black by * and white by -
so.. yeah,.. anyhelp would be appreciated.