Learn to Code via Tutorials on Repl.it!

← Back to all posts
A Game Of Chess
ready12345 (0)

Hi guys!

I just made a game of chess!
Even though it won't show you a chessboard.
Follow me!
I'm working on another project

Commentshotnewtop
YuAndy (72)

I've made one before here

ready12345 (0)

@YuAndy YOUR project ain't working😢

YuAndy (72)

Use try in case the player enters something illegal. Also please add stalemate.

ready12345 (0)

@YuAndy
. I don't know where to put the try

YuAndy (72)

@ready12345
So for example if the function this() shows an error sometimes, you can do:

try: 
    this()
except:
    that()

This will run this() and then if this() raises an error, run that().

ready12345 (0)

@YuAndy I do not get what are saying

DOPPY (7)

This is not working

ready12345 (0)

I think it'll give you an error