B4J Tutorial Anyone for a game of Chess...

Johan Schoeman

Expert
Licensed User
Longtime User
Here it is! Converted the UI class to B4J and making use of the "engine" class via inline Java code. No external library required. Give it a try - you can amend the code to your liking. B4J sample project attached. Remember, WHITE needs to make the first move

The B4J layout has a Canvas only.

You need to play for both Black and White. Just click and drag the pieces according to chess rules.

A typo in the heading of the UI - it should be B4J and not B4A. Regardless, you can use it in B4A as long as what you do the required changes to the UI to suite B4A. It should be minimal.

Black King below is in check-mate. Black must move but stuck in check-mate

1679827759130.png
 

Attachments

  • b4jCanvasChess.zip
    38.3 KB · Views: 220
Last edited:
Top