Share your repls and programming experiences

← Back to all posts
Console Chess - The result of 3 months of hard work - ♟️
h
EpicGamer007 (1751)

Chess

This is a console chess game written in java.

  • Removing pieces
  • Moving pieces
  • Castling
  • En passant
  • Checkmate and Checks
  • Draws*
* We are missing one type of draw and that is the insufficient mating material draw, but we have decided that implementing that would be too complex

To play the game, simply run the program and then choose what you want to do. configure the settings and then start playing!

To play the game, you need to input the location of the piece you are moving and the location you want to move to. For example, e2 e4 to move the piece at e2 to e4.

Credits

IMPORTANT

  • We are working on implementing standard chess/algebraic notation so stay around so you can see that implemented too.
  • This took around 3 months

We hope you enjoy :)

Edit: If we were not clear enough, this game is like complete chess with all the errors/edge cases handled, special moves, removing taking pieces, checks, checkmates, draws, etc. (Except of course, the insufficient mating material draw)

Edit 2: Bug where you could not castle on queenside has been fixed

EDIT 3: Please do not ask for edit access because I will not give it to you, if you have a good reason to want edit access, tell me and I will see. If you do not have a good reason, fork it. I have been getting spammed with notifications for edit access. I just wanted to let you all know, thank you!

Comments
hotnewtop
EpicGamer007 (1751)

@dakshg doesnt get enough credit. He did like 80% of the logic and he helped with a ton of other stuff

Whippingdot (675)

YOU REACHED 1000 les gooooo. 15 upvotes for this comment and 100 smthing upvotes for this post. @EpicGamer007

LingWu1 (94)

Wow, not bad for java, @EpicGamer007, 3 months of hard work deserved! I upvoted.

EpicGamer007 (1751)

@LingWu1 thanks! (what do you mean by "not bad for java")

LingWu1 (94)

np @EpicGamer007 When I say that I mean that u r good at java because I am horrible

LingWu1 (94)

:D my mums friend is giving me lessons @EpicGamer007
Teacher - What does class mean?
Me - I have simply no idea
Teacher - ok then, what does int mean?
Me - uhhhhhh(goes on for a longggg time) integer?

CoolGuy27 (68)

@LingWu1 work hard and you'll get it!

SwaritChoudhari (85)

BTW it is en passant not en passent

SwaritChoudhari (85)

The best! Love it!!! I also love chess! Not to mention, I'm pretty good at it too! :)

JBloves27 (1901)

LOL, that's what happened to me;

EDIT 3: Please do not ask for edit access because I will not give it to you, if you have a good reason to want edit access, tell me and I will see. If you do not have a good reason, fork it. I have been getting spammed with notifications for edit access. I just wanted to let you all know, thank you!

EpicGamer007 (1751)

@JBYT27 bruh like half of my notifs are request for edit access and it is really annoying me :(

JBloves27 (1901)

ooof, i never even touched half of them, i feel you XD @EpicGamer007

Whippingdot (675)

HOW YU DO TIS TIS BERY GOOOOODLY

Whippingdot (675)

Welcome. You have to be very talented to do this, the game(even tho I didn't play it for more than 3 seconds) works very nicely. It knows when a piece is moved wrongly, and stuff like that. Very nice @EpicGamer007

muffinman12345 (34)

Nice Dude IS there a bot

EpicGamer007 (1751)

@muffinman12345 we have not made a bot for this. it wud be much too complex for us

muffinman12345 (34)

@EpicGamer007 Yes I agree. I cannot make a bot cuz im only 14 years old!

Jerryc07from (6)

Could you make the chessboard bigger? It would be easier to see.

EpicGamer007 (1751)

@Jerryc07from i cant do it myself, but you can. press ctrl and + or zoom in

ReyesP (24)

Can you make castling easier? CK as in castling kingside and CQ as in castling queenside?

EpicGamer007 (1751)

@ReyesP the problem is i have to remake the jar and all that stuff so like, if i do it, i probably will go back to the old bash file (main.sh) which means that it will take longer to load generally.

ReyesP (24)

@EpicGamer007 Oh (by the way I have no knowledge of Java).

BobTheTomatoPie (3362)

I can see that there was a lot of work put into this

OldWizard209 (1617)

wow this is cool,

but there is only one problem

I don't even know how to play chess

But dw, imma updoot, cuz this prolly took a lotta effort to make ig....

GREAT JOB @EpicGamer007

GEISTCODER (22)

Woah that's cool man

ShajeenthShan (1)

Its a bit hard to move

EpicGamer007 (1751)

@ShajeenthShan this is in the console, we cannot use the mouse to move in this

fishyCoding (3)

I will recommend you make moving pieces slightly easier.... But other than that, great project! Gave u an upvote!

DynamicSquid (5023)

:(

There's so many good posts on Repl.it but I don't have time to see them all!

EpicGamer007 (1751)

@TheJamCoder that is supposed to happen, you entered a bad move so it says u entered an invalid move

TheJamCoder (11)

@EpicGamer007-And if you don't want to it is ok

TheJamCoder (11)

@EpicGamer007-It doesn't work for me. But add some more options and fix some errors and make a second nice game and please make the chess board bigger and make a random player computer to make it more challenging and put a easy hard and god mode and make it 3d it might even get 200 upvotes if you do this. And make other games like Ludo ext. If you want to do this it is fine :).

EpicGamer007 (1751)

@TheJamCoder if u want to make the chess board bigger, press ctrl and +. i cannot make it bigger myself. IDK if I and @dakshg can create a chess bot though. that would be extremely difficult. sorry

CyberHacker101 (136)

lol how many times did you get the comment "Can you make the chessboard bigger?"

EpicGamer007 (1751)

@CyberHacker101 i know right. liek bruh, at least read the comments, and at least try making it bigger yourself.

TcDouble (1)

Nice Abhay, (Its the long name boi), I have absolutely no idea what this website is but signed up to say nice job.

iomarz (1)

won with one input, ez. cool game tho

EpicGamer007 (1751)

@iomarz how do u win in one move??

elizurfk (17)

@EpicGamer007 dunno I am a chess player and the shortest mate is 2 moves...
1.g4 e5 2.f3 Qh5#

elizurfk (17)

@EpicGamer007 but resigning means the other person wins though

JBloves27 (1901)

Hey @EpicGamer007, I had a quick question!
How did you make the board checkered? I tried looking through the code... It's too confusing for me! XD
If you do reply, thanks!

I'm sry for the ping, you must be getting lots of notifications.

EpicGamer007 (1751)

@JBYT27 its ok, so the checkered board uses escape characters(which are in Finals.java). We used unicode characters for the pieces. We have two methods where we print the board, here and here. They are the exact same thing but different with a different orientation.

JBloves27 (1901)

oh, ok! Thanks so much! :D @EpicGamer007

coolme (2)

I didn’t really mean to send the request my device got hanged and it pressed anything