chess program + bot soon maybe

soo I wanna make a chess bot but to make a chess bot I need a chess program so am making that rn

so far I only made a way to load a FEN and display it

starting position

the piece colors are kinda easier to see when I highlight them

piece colors

I’ll post another update (and make it public) when I make it so that you can make moves and when I finish the bot I’ll publish it and post it in Project Showcase. maybe even put it on Lichess so ppl can play it there

bye now I’m going to sleep!


Wait how did you disllay images in the console :flushed:

1 Like

use ncurses

1 Like

I didn’t I used copy paste figurines

1 Like

Repl link pls

1 Like

It’s private right now

1 Like

I can help you bring it to AMC lol


lol dude ncurses doesn’t magically print pixels to console. It’s just a faster way than pure ansi (since it’s c native) to do cursor operations


btw for any chess players upset I fixed it (file letters)


1 Like

Might just be me, but I feel like the letters should be along the left, and numbers along the top.

1 Like

umm… files are letters and numbers are ranks. rank numbers go along the left, and file letters go along the bottom


Well… Kinda. The problem is that the board needs to be rotated another 90 degrees. Then that will fix it.

1 Like

even if you’re black. this is all according to btw

1 Like

it’s rotated not flipped. anyway it’s sideways cause I think that makes more sense since I don’t have a bot to play against you yet so you’d have to play by yourself and it’s a lot easier to turn your head 90 degrees than upside down


bruh I messed up

What if you put white on the left, black on the right, and then flip the direction of the numbers, and put the letters on the left. That would be the most accrutrate

I find it to be more intuitive with white on the right… Idk I’m definitely going to make a “preferences” thing later though

actually rereading your post that would not be the most accurate cause that’s putting numbers on the right, assuming we’re all looking from white’s perspective?

Standby, making visual…

I’m thinking of rewriting most of my code for the board rn cause it’s an array a list of 64 pieces and trying to figure out the index of each piece is too hard with the board being flipped n all… and I just realized I made a huge mistake with it so uh do you guys have any ideas

If it’s an array/list, wouldn’t this kinda make sense?

board = [
    [(Row 1)],
    [(Row 2)],
    [(Row 3)],
    [(Row 4)],
    [(Row 5)],
    [(Row 6)],
    [(Row 7)],
    [(Row 8)]

Alternatively, dict form:

board = {
    "A": [(Row A)],
    "B": [(Row B)],
    "C": [(Row C)],
    "D": [(Row D)],
    "E": [(Row E)],
    "F": [(Row F)],
    "G": [(Row G)],
    "H": [(Row H)]
1 Like