Skip to content

Commit

Permalink
beginning tictactoe
Browse files Browse the repository at this point in the history
  • Loading branch information
apa64 committed Jul 1, 2020
1 parent 8820d55 commit e4b4c43
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tictactoe1.p8
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e4b4c43

Please sign in to comment.