CMU 15-112 Fall 2015 Quiz7 Practice
(Due never)



  1. Code Tracing
  2. events-example3
  3. drawLinePattern(canvas, x0, y0, x1, y1)
  4. drawGrid(canvas, left, top, right, bottom)
  5. Connect4

  1. Code Tracing
    See here.

  2. events-example3
    Be sure you thoroughly understand and can easily derive everything except the run() function in events-example3.py.

  3. drawLinePattern(canvas, x0, y0, x1, y1)
    Write drawLinePattern from here (see question 2.3), which draws this:

  4. drawGrid(canvas, left, top, right, bottom)
    Write drawGrid from here, which draws this:

  5. Connect4
    Write a graphical version of Connect4, which works like the one we wrote this week in recitation. You should support both mouse-based and key-based moves. Furthermore, you should include a timer such that each player only has up to 3 seconds to play their turn. If a player runs out of those 3 seconds, the turn swaps immediately to the other player. As we did before, you should use wordSearch to do the actual checking for a win. While you are required to be able to write wordSearch from scratch, we are reall focusing on the graphics and animation portion in quiz7.