Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1.17 KB

README.md

File metadata and controls

26 lines (21 loc) · 1.17 KB

This is an implementation of the Connect four game, made for the "Introduction to Go" course at FMI. There is a server, a client with a GUI and you can play against a friend or AI. For the GUI I have used the Ebiten game engine.

screen

There are two modes of online play:

  • Play with a friend. This works by creating a room, for which a unique token(5 character code) is generated. Other player can connect to the room with this token.
  • Quick play: You wait for a random player to connect and play with you.

The server can handle many concurrent games as each game is in its own goroutine. It is implemented with TCP Sockets. You can also play against an AI which is implemented by the alpha-beta game tree search algorithm.

To build and run locally:

git clone https://github.com/TeodorDyakov/spooky-connect4
cd spooky-connect4/client
go run -x main.go

To start a server, on given port:

go run server.go -port=12345

To change the server to which the client connects(default is localhost:12345):

go run main.go -host=localhost -port=12345