You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While a console project is cool as a draft, a graphical version would be nice to appeal to a casual audience.
Rendering could be done using a graphic API like this:
screen.set_pixel(0,0, "#000000") # Black border
screen.set_pixel(1,0, "#ffffff") # 1st pixel of the 1st tile
screen.set_pixel(2,0, "#ffffff") # 2nd pixel of the 1st tile
etc...
Then detecting mouse clicks could be done in this way:
(set "move" to None if the cursor is not over a clickable cell, or the cell number otherwise)
x, y = get_mouse_position()
if x == 0 and y == 0: move = None
if x == 1 and y == 0: move = 1
if x == 2 and y == 0: move = 1
# ...
if x == 50 and y == 50: move = 5
# ...
The text was updated successfully, but these errors were encountered:
While a console project is cool as a draft, a graphical version would be nice to appeal to a casual audience.
Rendering could be done using a graphic API like this:
etc...
Then detecting mouse clicks could be done in this way:
(set "move" to None if the cursor is not over a clickable cell, or the cell number otherwise)
The text was updated successfully, but these errors were encountered: