public class Computer extends Game
Denis Marshall wrote:At the time I thought if I was to make another class where I could create a method for Computer to generate a hand and later compare this in another to declare winner. I think basic rookie mistake
Denis Marshall wrote:However I'm not too sure how I can sort of take it from here, because I'm afraid I might get it wrong again.
Exception in thread "main" java.lang.NullPointerException
Junilu Lacar wrote:
The code looks ok but it doesn't read very well and it raises a few questions. What I really want to say is something like this:
But being able to write this kind of code means we have to define the Move class (or enum, as the case may be) differently.
Denis Marshall wrote:I'm not sure how I can apply this to mine in my situation
I think the the next steps might be:
Create a method setWinner which will decide who has won depending on the comparisons given
Call methods playerHand, computerHand & setWinner in main?