diff --git a/tictactoe1.p8 b/tictactoe1.p8 new file mode 100644 index 0000000..93f9cc5 --- /dev/null +++ b/tictactoe1.p8 @@ -0,0 +1,42 @@ +pico-8 cartridge // http://www.pico-8.com +version 27 +__lua__ +-- tictactoe1 +-- by apa64 + +-- todo: +-- title screen with instructions +-- 3x3 playing field cell matrix table +-- game state: +-- select_cell +-- --> check_valid +-- --> check_victory +-- --> change_player +-- --> select_cell + +function _draw() + cls(0) + draw_cell(0,0) +end + +function draw_cell(x,y) + sspr(8,0,8,8,0,0,8,8) + sspr(16,0,8,8,8,0,8,8) + sspr(8,0,8,8,16,0,8,8,true) + sspr(24,0,8,8,0,8,8,8) + sspr(24,0,8,8,16,8,8,8,true) + sspr(8,0,8,8,0,16,8,8,false,true) + sspr(16,0,8,8,8,16,8,8,false,true) + sspr(8,0,8,8,16,16,8,8,true,true) +end +__gfx__ +00000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000006666666666600600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000060000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000600000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700006000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000006000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000006000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +__map__ +0000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000