CSE231 Honor Project
see a working version of gomoku
sample code
check point #1(Nov. 2): Get familiar with pygame and draw Gomoku board
- use pygame.draw.line, see manual.
- use loop
- choose your own color scheme
- put it in to a function, no input & output e.g. def draw_board()
check point #2(Nov. 9): draw board with pieces according to the 2-dimensional
list
- use 2-dimensional list to represent board.
- 1: black piece, 2: white piece, 0: empty
- use function
check point #3(Nov. 16): keyboard interation: control cursor using keyboard
- draw a cursor.
- move cursor and place pieces, using keyboard[how to input with keyboard]
- follow the program flow on the lecture slides.
check point #4(Nov. 22): Test winning
- after a piece is placed, test whether current play wins the game
- 5 pieces in a row, vertically, horizontally, diagnoally.
put everything together, you program by Nov 22 should do the following
things.
- draw a borard which has 15 x 15 cross points. Represent the board by
using a 2-dimensional list
- draw a cursor that can be control by keyboard.
- after a piece is placed, test whether this is a winning move(5 pieces
in a row)
- update board list
- redraw board and piece based on current board list
check point #final: simple AI
- make simple AI so your program can do easy defense and attack
- see slides for details