Skip to content

Elixir "translation" of a Ruby CLI game used to compare and contrast OOP with functional programming while practicing test-driven development.

Notifications You must be signed in to change notification settings

karen-olson/elixir-tic-tac-toe

Repository files navigation

Elixir Tic-Tac-Toe

This Tic Tac Toe game is a command line application built in Elixir. The initial functionality permits gameplay between two human players. The program will exit when gameplay ends: either when a player has won, or if the game has reached a draw.

Table of Contents

Getting Started

Installation

Clone this repo from the terminal:

git clone https://github.com/karen-olson/elixir_tic_tac_toe_basic

cd to the program directory & install dependencies:

mix deps.get

Linting

Run the linter:

mix credo

Testing

Run tests:

mix test

Usage

Build the program

From program directory:

mix escript.build

Launch the program

From program directory:

./elixir_tic_tac_toe_basic

Instructions

Enter the number (1-9) of the space on the board where you want to move. Player 1 moves first and marks their spaces with an “X”. Player 2 marks with an “O”. To win, claim 3 adjacent spaces in a horizontal, vertical, or diagonal line. If there are no free spaces and no player has won, the game will end in a draw.

Future Implementation

  • Add gameplay between a human player vs. AI player
  • Allow user to select the order of players

About

Elixir "translation" of a Ruby CLI game used to compare and contrast OOP with functional programming while practicing test-driven development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages