jordansoans2002 / Games_Arcade

1 stars 0 forks source link

hand cricket basic game code #7

Closed jordansoans2002 closed 2 years ago

jordansoans2002 commented 2 years ago

Algorithm:

  1. start (player is batsman, computer is bowler)
  2. player enters number in given range, computer generates a random number in specified range
  3. if both are equal batsman out
  4. else batsman's no added to runs and no of ball increase by one
  5. after each ball display batsman's runs and total balls
ASMA-GIT commented 2 years ago

@jordansoans2002 I would like to work on this issue.

ASMA-GIT commented 2 years ago

@jordansoans2002 I would like to work on this issue.

Can u let me know if i need to add code into a new file or in an existing file?

jordansoans2002 commented 2 years ago

basic code game code is done. need to make the code more efficient by merging batting and bowling into one function

jordansoans2002 commented 2 years ago

Batting and bowling is merged into one function. The function return true if innings ends and call setScene to change the scene. Accepts user input in function definition and accesses input message directly from the networking program. This function is called when the umpire stop animation plays and the showHand animation plays. The function should access values of input and incoming message at the instant the umpire puts his hand up