Question: Requirements ( Part 1 ) [ 6 0 % ] You need to write a small contract that provides the following functionalities and requirements: 1
Requirements Part You need to write a small contract that provides the following functionalities and requirements: Two players can register for a cardbased Jungle game. a This should be done by sending ethers when invoking the register function. b Return the received ethers if registration fails. After registration, they can input the TWO choices via inputMove function. The choices represent the first and second round move for the player. a Available choices from the highest rank to the lowest: Lion, Wolf, Cat, Rat b Rule: i Lion captures Wolf; ii Wolf captures Cat; iii. Cat captures Rat; iv Rat captures Lion c The choices must be unique for a player, egLion Lion is not allowed. use require to enforce it winning function: anyone can check the winner after the players provide their choice. a Both player must have inputted their choices. b The player having the highest win count is the winner; shehe gets all the bets ethers c Return ether to both players if draw no of wins equal d Reset the game
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
