Connect four game program

You are to create a knock-off of connect 4 that:
allows for three players (I recommend using tokens X, O, B for the three players)
looks for an 'L' of pieces instead of just 4 in a row.
operates on a game board of size 8 rows and 9 columns (game board for classic game was 6 rows of 7 columns)
Basic Rules
players drop their tokens at the top of a column
tokens fall down a column until they reach another token, or the bottom of the board
game play continues until board is full or someone wins

can someone show me how to set this up?
well, you need a board, probably a (conceptually) 2-d array of characters.
you need a function to do a move, which has to find the "bottom-most" slot to fill in, and prevent dropping into a full column, etc.
You need a function that checks to see if anyone won after a move (hint: you only need to check if the last move was a winner, not the whole board, for efficiency and simplicity).

There really isnt much more than this at the core. Youll have some house-keeping stuff like telling each player it is their turn now, and drawing the board somehow, but this is how you probably want to break the problem down and solve it. That is the core of learning to code.. you must master this... the ability to break the problem down into smaller parts and build a large thing from many small things. That is easily 75% of the art of coding.
Topic archived. No new replies allowed.