Skip to content

omar0ali/tictactoe-game-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe CLI Game

A simple terminal-based implementation of the classic TicTacToe game written in Go, using the tcell library for handling terminal graphics and input.

TicTacToe Game

TODOS

  • Implement a window Object (tcell screen), ready to be drawn on the screen.
    • Uses ticker Update() iterate over frames. Currently shows FPS top left the screen.
  • Single Box Object that can be clicked via the mouse button to draw on X or O.
  • Set 9 boxes in the middle of the screen.
    • Ensure all boxes are centered.
    • GridView created and can draw list of boxes.
    • The game show who wins the game X or O at the end of every match.
  • Show logs and current Turn. Status (Should be shown on the bottom of screen).
    • Need to limit height of the Logs window. Only 5 lines shown.
  • After each end of the game, should should a dialog, showing the winner
  • Ask player to restart the game or exit.
    • Dialog Box added
  • Disable dialog windows with h key.
  • Single-player with MiniMax algorithm (will try to implement)
    • To use AI, ensure that its player 2 turn and press a key to start the AI move.
  • Win pattern change color on the board

Getting Started

Clone repository

git clone https://github.com/omar0ali/tictactoe-game-cli.git

Run the game

go run .

About

Simple tictactoe game written in golang using tcell library.

Topics

Resources

Stars

Watchers

Forks

Languages