Skip to content

adityaathalye/oxo

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
oxo
 
 
 
 
 
 

To play

  • Clone, cd into the root dir, and run the "main" script: $ ./oxo
  • Your machine should have Bash 4+, preferably Bash 4.4+ (latest stable)
  • Be kind to the "Computer player". It is randumb :D

To code-read

  • Board design and setup is at the beginning of oxo_logic.sh
  • The scoring logic is based on pattern matches against a regularly-formatted board. See:
    • The linchpin function fit_board_to_square_grid
    • The commentary in the # SCORING LOGIC section
    • The scoring functions, particularly __all_crosses, __all_noughts, __player_wins_grid, crosses_win, noughts_win, and its_a_draw

But why?!?

For unabashed mirth and merriment, of course. Why else?

Follow the commit history to trace how the game logic gradually emerged.

About

A game of traditional 3x3 Noughts and Crosses, in Bash.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages