Clue Game Debugging vs Planning • Debugging helps when you have a correct algorithm/approach but an incorrect implementation • Debugging can show us the sequence of steps and resulting values. This might help us design a solution. But it is MUCH more efficient if we start with a good approach (can avoid hours of tedious debugging) Flowchart Review External event Decision Process (statement) Process (function) Display Next Player • Draw a flowchart* for what happens when the Next Player button is pressed. • Think about: – What actions are common to both human and computer players? – How will you enforce game play rules? – How will you ensure the human finishes their turn? Hint: do NOT use a loop; this is event driven. * draw a flowchart, do NOT just write in English/psuedocode. Flowchart is much easier to see at a glance. Getting Started Next Player Mouse pressed Do flow for BOTH human and computer players More detail is better! I used ~29 flowchart symbols for these actions. You don’t need to try to match mine. But if you have a flowchart with only 5 symbols, for example, it likely does not contain enough detail. My flowchart will be posted on piazza after both classes have done this inclass exercise. Your solution does NOT need to match the flowchart. But it might help you avoid some common issues. Today’s Process • I will review each pair’s flowchart • Sorry but I will not be able to listen to you explain it • I will be talking quickly… only way to get to ALL pairs in one class period • Please do NOT ask about: homework grades, git, attendance… I will barely have time to look at flowcharts.
© Copyright 2025 Paperzz