Skip to content

Week 3 04 08

fengttt edited this page Apr 8, 2020 · 2 revisions

Plan

  • pygame!
  • init, open a window, the game loop
  • game loop and quit
  • x, y, color, rect, and fill

Homework

  1. Run the pygame hello world. Just make sure it can run.
  2. In your siplib, create a new module (you should had one called toy.py), call it sg.py (or, sipgame.py). Put your globals in this library module. For example, BLACK/WHITE etc.
  3. Change your pygame hello world, import your module sg, and use sg.RED, sg.BLUE, etc.
  4. Experiment different values of the colors. Esp, define some new colors in sg. You should add at least PURPLE/ORANGE/YELLOW/CYAN/GREY.
  5. Keep on working on tictactoe and queens.
Clone this wiki locally