The simple Tic tac (X-O) game thats works in LAN. This game was develope with C#
and .NET Core 3.1
.
This game use TCP socket communication to interact with other computer in LAN network
-
In first page of application we have two section, one for start server and host the game and another one for connect to running server.
-
For tcp communication in C# I use
TcpListener
for listen for incoming connection and act like a server andTcpClient
for making connection to server -
After connection was made between server and client we should have a Handshake thats give players id and select roles for players randomly, then pick one player thats start the game.
-
Now we ready to play. In the last after each move on the table we have to demeter is anyone win or not or maybe we had no winner and game was draw
![]() |
![]() |
---|---|
![]() |
![]() |