Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tboydston/supremetictactoe

Löve 2d, Lua tictactoe implementation of Minimax algo with alpha/beta pruning. Includes sardonic AI opponent, multiple win paths and over 200 ego shattering quips.
https://github.com/tboydston/supremetictactoe

love2d lua minimax tictactoe

Last synced: about 1 month ago
JSON representation

Löve 2d, Lua tictactoe implementation of Minimax algo with alpha/beta pruning. Includes sardonic AI opponent, multiple win paths and over 200 ego shattering quips.

Awesome Lists containing this project

README

        

# Supreme TicTacToe

![banner](assets/header.jpg)

## Overview

You, a mere mortal meatbag, face off against the perfect immortal machine known as "Supreme" in an epic battle of X's and O's. It will require all or your human cunning to find and exploit bugs to defeat Supreme at it's own game.

Highlights

- 8 unique paths to victory.
- Over 200 ego shattering insults.
- Disappointing 8 bit graphics.

## Less Hyperbolic Overview

Supreme TicTacToe was created when I was playing around with implementing miniMax alpha beta pruning in Lua for Love2d. I got tired of playing against myself and so added a little frenemy to play against.

Overall it is a puzzle game. You cannot defeat Supreme at tictactoe but if you’re clever you unleash your inner QA engineer and exploit bugs in Supreme's code.

# Code Overview

As with all Love2d programs the entry point is 'main.lua'. All traditional love game loop calls are routed to the 'SceneManager' which is a singleton responsible for directing calls to the active scene.

### Minimax Alpha/Beta Pruning Implementation

If you are here for the lua minimax implementation see lib/miniMaxMove.lua

### File Structure

assets - Contains graphics, sounds, fonts, ect.

entities - If it draws on the screen it is an entity. Entities are created using entity1 = Entity:new()

lib - Libraries contain global functions that are expected to exist only once. There internal function are called using lib.function()

quips - Quips control Supreme's speech. There are autoload by the quipManager library and new quips can be added directly

scenes - Scenes are the game-loop for each scene. They are auto-loaded by the sceneManager.

config.lua - Basic config data mostly used for debugging.

main.lua - Program start point.

# Running The Game.

Supreme TicTacToe can be run directly from the console using the below command on mac/linux systems.

``
love . --console
``

# Building the game

We build Supreme TicTacToe using 'Make Love' available here.

https://github.com/pfirsich/makelove

# Thanks
Thanks to Komodeo for playtesting and improving content.