all repos — tictactoe @ main

tic-tac-toe game for uxn

43c4c19b
use sprites to draw cursor and board

this is a bit more code, but ten times less cycles to
draw the board and the cursor. the latter now looks slightly different,
this is somewhat unintentional, but only slightly.

also board is now drawn at the background layer, while
everything else is on foreground. doesn't matter much, but
makes more sense.

in uxn32 redrawing the cursor erases figures. looks awful and is a bug.
but this happens probably because uxn32 lacks the recent update to
a screen device.
la-ninpre aaoth@aaoth.xyz
Tue, 29 Aug 2023 17:54:41 +0300
94c3b37d
refactoring and optimization

- remove logic from drawing code (also simplify)
- remove ability to make move with space key
- fix bug where game instantly restarts at the end
(key release event was triggering the restart)
la-ninpre aaoth@aaoth.xyz
Tue, 29 Aug 2023 14:37:05 +0300
e55541a2
compact board drawing code

also make cursor change color in place
la-ninpre aaoth@aaoth.xyz
Mon, 28 Aug 2023 15:53:21 +0300
fb81c95b
gitignore: ignore sym files and snarf
la-ninpre aaoth@aaoth.xyz
Mon, 28 Aug 2023 15:53:17 +0300
7b771aac
remove makefile and update readme
la-ninpre aaoth@aaoth.xyz
Mon, 28 Aug 2023 13:24:57 +0300
3190ad25
major refactoring

- fix bug when game restarts and board doesn't get cleared
- optimize by using immediate opcodes and fallthrough subroutines
- lint with uxnlin
- format with uxnfor
- store x and y coordinates of the cursor in different bytes
(i thought this was a cool memory hack, but since the variables
are located in zero page this doesn't save memory, on the contrary,
it adds unnecessary complexity to manage packing and unpacking
coordinates from nibbles)
- remove loops from check-win
- remove nested comments
- avoid redoing some work when game restarts (restart code
now jumps to code that is necessary to only reset game state and
clear the board)
la-ninpre aaoth@aaoth.xyz
Mon, 28 Aug 2023 13:09:56 +0300
fa168f38
readme: correct prerequisites
la-ninpre leobrekalini@gmail.com
Tue, 27 Sep 2022 23:03:49 +0300
06dd1c01
apply optimizations

add lint to makefile
la-ninpre leobrekalini@gmail.com
Thu, 07 Jul 2022 22:20:48 +0300
fbe9cf3d
makefile: allow uxnasm to be used as an assembler
la-ninpre leobrekalini@gmail.com
Tue, 05 Jul 2022 11:08:17 +0300
3efb367b
init
la-ninpre leobrekalini@gmail.com
Mon, 04 Jul 2022 16:05:16 +0300