This site requires JavaScript, please enable it in your browser!
Greenfoot back
CatalinM
CatalinM wrote ...

2016/11/27

Complition of a chess board using a horse!

CatalinM CatalinM

2016/11/27

#
(I am sorry for my bad english) Hey,I have a project for my programming class and I don't have any idea how i should start.This project is based on making a application that should move a horse(chess piece) around a chess board with custom dimensiones n*n without stepping on the same cell of the chess board two times.If someone could give even a little advice i would be grateful.
danpost danpost

2016/11/27

#
I would start by having two world constructors. The first one with no parameters would call the second one with an int parameter to indicate the number of squares along one side of the board. This second constructor should possibly create and set the background image and add the horse into the world. The act method could check for numeric keystrokes between 5 and 9 (perhaps) to recreate the world with a different size.
You need to login to post a reply.