Skip to content

HeartofTheForce/Heart.Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heart.Stack

A mock service stack, with a focus on maintainability, monitoring, security and stability.

Built On

Dashboard

Getting Started

Make sure you have access to Docker

Run ./scripts/run-stack.sh

Interesting Things

  • TicTacToe Game State Compression

    A single game has up to 9 turns
    Each turn has 9 - n possible moves
    Store the index of the available moves of each turn inside the bits of an integer as follows:
    1 - 00000000000000000000000000001111
    2 - 00000000000000000000000011110000
    3 - 00000000000000000000011100000000
    4 - 00000000000000000011100000000000
    5 - 00000000000000011100000000000000
    6 - 00000000000011100000000000000000
    7 - 00000000001100000000000000000000
    8 - 00000000110000000000000000000000
    9 - 00000001000000000000000000000000
    Each slot has a minimum value of (9 - n) + 1 to allow for 0 to be used to indicate an untaken turn