Week 14: Exercises

1. Hex

In last week's tutorial we began implementing the game of Hex. Here is the code we've written so far.

a) Commit the code to a new Git repository at gitlab.mff.cuni.cz, gitlab.com or github.com.

For each of the following changes, make a new commit and push it to the remote repository.

b) Draw a green border along the top and bottom sides of the gameboard, and a purple border along the left and right sides.

c) Indicate whose turn it is to move.

d) Detect when a player has won, and draw a line along the winning path.

e) Implement a computer player for the game using a greedy algorithm that does not look ahead.

f) Improve your computer player so that it looks ahead using the minimax algorithm.