reset password
Author Message
jroble52
Posts: 15
Posted 17:16 Apr 21, 2018 |

I'm a bit stumped on a couple of things about the runner. I'm confused on how to represent the runner in data, as well as where to put the code to show display him on the GUI.

For the most part I understand the KeyEvent stuff and that the runner's row or column is added or subtracted based on which key you press but to see that in action I wanna have the runner on screen.

Thanks

Last edited by jroble52 at 18:02 Apr 21, 2018.
jhurley
Posts: 207
Posted 08:05 Apr 22, 2018 |
jroble52 wrote:

I'm a bit stumped on a couple of things about the runner. I'm confused on how to represent the runner in data, as well as where to put the code to show display him on the GUI.

For the most part I understand the KeyEvent stuff and that the runner's row or column is added or subtracted based on which key you press but to see that in action I wanna have the runner on screen.

Thanks

Use a Coordinate that corresponds to the runner's location, and add or subtract 1 from the row or column when he moves.  When he moves, update the css for the GUI and also the corresponding square in the street map so that they match the row and column of that coordinate.

jroble52
Posts: 15
Posted 11:33 Apr 22, 2018 |
jhurley wrote:
jroble52 wrote:

I'm a bit stumped on a couple of things about the runner. I'm confused on how to represent the runner in data, as well as where to put the code to show display him on the GUI.

For the most part I understand the KeyEvent stuff and that the runner's row or column is added or subtracted based on which key you press but to see that in action I wanna have the runner on screen.

Thanks

Use a Coordinate that corresponds to the runner's location, and add or subtract 1 from the row or column when he moves.  When he moves, update the css for the GUI and also the corresponding square in the street map so that they match the row and column of that coordinate.

Thanks for the response. Updating the css for the GUI and matching the StreetMap with the player's Coordinate is what I'm having most trouble with, do you have any tips or advice on that specifically?

Thanks

jhurley
Posts: 207
Posted 12:11 Apr 22, 2018 |

Just a variable of class Coordinate; you can use the getters and setters for the row and column