chesstv: light colored square on bottom right
1-based indexing is a hassle.
This commit is contained in:
parent
d40471e9dc
commit
22da460930
|
@ -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
|
or (rank == highlighted_squares.to.rank and file == highlighted_squares.to.file) then
|
||||||
hl = 4
|
hl = 4
|
||||||
end
|
end
|
||||||
if (rank+file)%2 == 0 then
|
if (rank+file)%2 == 1 then
|
||||||
-- light square
|
-- light square
|
||||||
curses.attrset(curses.color_pair(1+hl))
|
curses.attrset(curses.color_pair(1+hl))
|
||||||
else
|
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
|
or (rank == highlighted_squares.to.rank and file == highlighted_squares.to.file) then
|
||||||
hl = 4
|
hl = 4
|
||||||
end
|
end
|
||||||
if (rank+file)%2 == 0 then
|
if (rank+file)%2 == 1 then
|
||||||
if x < 'Z' then
|
if x < 'Z' then
|
||||||
-- white piece on light square
|
-- white piece on light square
|
||||||
curses.attrset(curses.color_pair(1+hl))
|
curses.attrset(curses.color_pair(1+hl))
|
||||||
|
|
Loading…
Reference in New Issue