|
TopDown
Top level, evolving.
2nd crack at big picture Changes in italics. Please comment, expand Links: Jobs GlobalStructs Ask user(s) for board size initialize structures (whatever they are) Ask the user if 2 or computer yes ?? their symbols? Present instructions Present board (x = player who is "up"; Cx: Computer is player) C/Px: playerx moves (or Cx) Cx: Calculates (black box), decides on Move, pass (same as Px) Px: Output board, Solicit move Px CHECK validity, repeat if not Get Move, pass as WHAT? (pass as number, or change the Pipe array?) Update data structures Check for completed box Check for game end; ??Update scoring Re-outputiF Completed box, goto C/Px else change to other "player", goto C/Px Game end: Give final score |
Sign in to add a comment
My thoughts: After soliciting a move, I think the index of the pipe selected should be the return value, so that conversion between index and label is done inside the move procedure. Then that index can be passed to the Update procedure. Also, after Game end, I think we should ask them if they want to play again, and the "game" loop in main is wrapped inside another huge loop (while playAgain='y', or similar).