I implemented the level of difficulty by not processing the defensive move routine every time if the difficulty was set to easy or average. If none of this is possible, a random move is made, first trying on the corners and then on the sides. It tries to win the game at first, preventing the other player to win, and then tries to make a move avoiding "traps" and putting two computer pieces in a row. I tried to implement AI the best way I could, even with a long code. The control can be either by mouse or keyboard, using the NumPad or QWE, ASD, ZXC keys. When playing against another player, it is possible to play local or over a LAN or Internet (it uses TCP sockets for communication). There are three levels of difficulty when playing against the computer. It is possible to play against the computer and against another player. This is an example of a Tic Tac Toe game with AI and network support, written in C#.