A simple TicTacToe game

Date: — Lang: — by Slatian

Overview

Status
Completed
Language
Lua
Sourcecode
https://codeberg.org/slatian/game.tic-tac-toe
Started
2018-07-07

Written for the commandline this is my first game I've written myself, still fun to have around in 2020.

How to play

A sceenshot of a game currently in progress, playing field rendered in ascii-art at the top, a little guide which input number corresponds with wich field and a prompt asking O for their move.

                 ### ##\          /## ###                 
                 ###  \##\      /##/  ###                 
                 ###    \##\  /##/    ###                 
                 ###      \####/      ###                 
                 ###      /####\      ###                 
                 ###    /##/  \##\    ###                 
                 ###  /##/      \##\  ###                 
                 ### ##/          \## ###                 
##########################################################
##########################################################
                 ###                  ### ##\          /##
                 ###                  ###  \##\      /##/ 
                 ###                  ###    \##\  /##/   
                 ###                  ###      \####/     
                 ###                  ###      /####\     
                 ###                  ###    /##/  \##\   
                 ###                  ###  /##/      \##\ 
                 ###                  ### ##/          \##
##########################################################
##########################################################
##\          /## ###    __________    ###    __________   
 \##\      /##/  ###   / ________ \   ###   / ________ \  
   \##\  /##/    ###  / /        \ \  ###  / /        \ \ 
     \####/      ### | |          | | ### | |          | |
     /####\      ### | |          | | ### | |          | |
   /##/  \##\    ### | |          | | ### | |          | |
 /##/      \##\  ###  \ \________/ /  ###  \ \________/ / 
##/          \## ###   \__________/   ###   \__________/  
789
456
123
O's turn:

The game is pretty simple, X starts and then X and O make their moves by entering the number that corresponds to the field they want to place their marker on, if one of then gets a row of three they win, if the field fills up dbefore that happens the game is a draw.

Hint: Your Numpad probably has the same layout as the field numbers!