Week 1 challenge from Java club. The previous challenge is still viewable, and new weekly challenges will follow.
Hello everyone,
Hope you are all setting into online school well. Following a break over Christmas, we are going to start up with our weekly challenges from now on. Thank you to Taran and Rudrrayan for your solutions to our first challenge - it is still available if anyone else would like to attempt it. Our challenge this week is a basic introduction to reading and writing to and from the console, through a random number guessing game. The code can be found here : https://github.com/KEGSCodingClub/RandomNumberGame-JavaWeek1 I would like you to look through the code, asking any questions if you don't understand parts, and then begin the upgrades (since it is very stripped down): 1 - The game should be able to run back-to-back, if the user would like. I.e. prompting if you would like to play again, then looping. 2 - You can change the getLimit() method to allow the user to change the limit every time the game starts, using the same scanner stuff that we take the guess through. 3 - There should be input sanitation when getting the guess or the limit to make sure it is an int - the line readInput.hasNextInt() will help with this. Once complete, you can upload your code as a branch to the original commit, if you are unsure of how to do this refer to https://www.youtube.com/playlist?list=PL4-OwaM4TTTO_2AQ0xIiBgJ1j7uYRxBi7 If you are already familiar with Java and all of this stuff, as an extra challenge you could try and turn this into a window-based game rather than through console.
Again, there is no due date for this work - it is ultimately your own learning from our work here, we will be checking teams and github for any code or questions should you have them about any of the challenges at any time.
Thanks, Logan