Skip to content

holsee/XyOzys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xy Ozys

Aka. Tic-Tac-Toe, Noughts and Crosses etc.

Challenge

Implement a library which enables playing games of Xy Ozys.

Rules

  • Expose similar API to that defined in the Spec, however you may diverge for lang idiom reasons.
  • Implement using functional programming.
  • Write tests for the public API.

Spec

Functions

Start a new game:

new() # => Game

Player makes a move:

turn(Game, Cell, Player) # => Ok(Game) | Error(Reason)

Query the game state:

status(Game) # => Status

Types

Game    # Reference to the game
Cell    # Reference to a position within the game board
Player  # 'X' or 'O'
Status  # "Tie", "X Wins", "O Wins", "X's Turn", "O's Turn"
Reason  # Reason that `turn` operation was invalid e.g. "Game over", "Not X's turn" etc.

About

Coding Challenge: Implement Xy Ozys game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages