

|
 |
| << Topic |
< Post |
Post 2 of 12 Topic 5963 of 6137
|
Post > |
Topic >> |
Re: Pascal, Connect4 Game, 2D Array, display.
by Rob Kennedy <me3@[EMAIL PROTECTED]
>
Jan 20, 2008 at 05:26 PM
| israphelr@[EMAIL PROTECTED]
wrote:
> hello all
>
> -------------------------------------------------------------
> Tstates = (empty,red,yellow);
> Tplayers = red..yellow;
> Tboard = ARRAY[0..ColMax, 0..RowMax] OF Tstates;
> ------------------------------------------------------------
>
> This is a make up of the connect four board I am using.
>
> I have displayed the board on the screen (this is a console
> application, I am *very* inexperienced with programming and I don't
> know any graphics at all )
>
> My problem is I am not sure how once I have set an individual cell say
> ----------------------
> board : Tboard
> player 1 : Tstates
>
> player1 := red;
>
> board[0,1] := player1
> -----------------------------
>
> the cell at board[0,1] becomes red, but I am not sure how to display
> that to the user.
>
> Some suggestions would be great thanks.
If you're not comfortable with graphics, then you might want to
represent the players by something other than color! Consider using two
different characters, such as X and O. As you print the board on the
screen, draw different characters to represent different states of each
position on the board.
Have you looked at Maarten Wiltink's tic-tac-toe program? Tic-tac-toe
isn't really much different from Connect Four.
http://www.kittensandcats.net/maarten/programming.html
--
Rob


|
12 Posts in Topic:
|
"israphelr@[EMAIL PR |
2008-01-20 14:07:48 |
|
Rob Kennedy <me3@[EMAI |
2008-01-20 17:26:49 |
|
"israphelr@[EMAIL PR |
2008-01-20 15:32:17 |
|
Rob Kennedy <me3@[EMAI |
2008-01-21 01:01:24 |
|
Hans-Peter Diettrich < |
2008-01-21 00:42:27 |
|
Marco van de Voort <ma |
2008-01-21 10:55:51 |
|
Hans-Peter Diettrich < |
2008-01-21 15:49:58 |
|
Marco van de Voort <ma |
2008-01-21 20:08:02 |
|
Hans-Peter Diettrich < |
2008-01-22 00:13:25 |
|
Marco van de Voort <ma |
2008-01-22 07:46:17 |
|
ap <ap.mail@[EMAIL PRO |
2008-01-22 10:49:18 |
|
Marco van de Voort <ma |
2008-01-24 09:57:00 |
|
Post A Reply:

|
|
|
|