diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-22 00:32:48 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-22 00:32:48 -0800 |
commit | 22da4609307d24ecbadb9df456366750daee7ec6 (patch) | |
tree | c9227457368331984814809b6f97b0ecd0a8a4a0 | |
parent | d40471e9dc7b47262fa0a176c90089afdfac20c9 (diff) | |
download | teliva-22da4609307d24ecbadb9df456366750daee7ec6.tar.gz |
chesstv: light colored square on bottom right
1-based indexing is a hassle.
-rw-r--r-- | chesstv.tlv | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chesstv.tlv b/chesstv.tlv index d9dea99..c49219d 100644 --- a/chesstv.tlv +++ b/chesstv.tlv @@ -48,7 +48,7 @@ function render_square(current_game, rank, file, highlighted_squares) or (rank == highlighted_squares.to.rank and file == highlighted_squares.to.file) then hl = 4 end - if (rank+file)%2 == 0 then + if (rank+file)%2 == 1 then -- light square curses.attrset(curses.color_pair(1+hl)) else @@ -73,7 +73,7 @@ function render_fen_rank(rank, fen_rank, highlighted_squares) or (rank == highlighted_squares.to.rank and file == highlighted_squares.to.file) then hl = 4 end - if (rank+file)%2 == 0 then + if (rank+file)%2 == 1 then if x < 'Z' then -- white piece on light square curses.attrset(curses.color_pair(1+hl)) |