Sashité for Developers
  1. Sashité for Developers
  2. Documentation
  3. CELL
  4. 1.0.0
  5. Examples
  6. 3D Tic-Tac-Toe

3D Tic-Tac-Toe - Size 3x3x3

CELL Coordinates:

Level A (Bottom)      Level B (Middle)      Level C (Top)
┌───┬───┬───┐        ┌───┬───┬───┐        ┌───┬───┬───┐
│   │   │   │ 3      │   │   │   │ 3      │   │   │   │ 3
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │   │ 2      │   │   │   │ 2      │   │   │   │ 2
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │   │ 1      │   │   │   │ 1      │   │   │   │ 1
└───┴───┴───┘        └───┴───┴───┘        └───┴───┴───┘
  a   b   c            a   b   c            a   b   c

Empty squares represented by spaces.


Initial Position

Game start with first X move:

Level A (Bottom)      Level B (Middle)      Level C (Top)
┌───┬───┬───┐        ┌───┬───┬───┐        ┌───┬───┬───┐
│   │   │   │ 3      │   │   │   │ 3      │   │   │   │ 3
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │   │ 2      │   │ X │   │ 2      │   │   │   │ 2
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │   │ 1      │   │   │   │ 1      │   │   │   │ 1
└───┴───┴───┘        └───┴───┴───┘        └───┴───┴───┘
  a   b   c            a   b   c            a   b   c

Legend

Locations


Next Position

Position after O move:

Level A (Bottom)      Level B (Middle)      Level C (Top)
┌───┬───┬───┐        ┌───┬───┬───┐        ┌───┬───┬───┐
│   │   │   │ 3      │   │   │   │ 3      │   │   │   │ 3
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │ O │ 2      │   │ X │   │ 2      │   │   │   │ 2
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │   │ 1      │   │   │   │ 1      │   │   │   │ 1
└───┴───┴───┘        └───┴───┴───┘        └───┴───┴───┘
  a   b   c            a   b   c            a   b   c

Locations


Final Position

Position showing a 3D diagonal win:

Level A (Bottom)      Level B (Middle)      Level C (Top)
┌───┬───┬───┐        ┌───┬───┬───┐        ┌───┬───┬───┐
│   │   │   │ 3      │   │   │   │ 3      │   │   │ X │ 3
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│   │   │ O │ 2      │   │ X │ O │ 2      │   │   │   │ 2
├───┼───┼───┤        ├───┼───┼───┤        ├───┼───┼───┤
│ X │   │   │ 1      │   │   │   │ 1      │   │   │   │ 1
└───┴───┴───┘        └───┴───┴───┘        └───┴───┴───┘
  a   b   c            a   b   c            a   b   c

Locations

Winning Line

X wins with 3D diagonal: a1Ab2Bc3C


CELL Integration

This example demonstrates CELL’s 3D coordinate system using:

Each position is uniquely identified by combining all three dimensions (e.g., b2A, c3C), enabling precise notation for three-dimensional gameplay and complex spatial relationships like diagonal wins across multiple levels.