Logic Simulator |
Contents
PART 1. 3
References. 9
PART 1
Rock Paper Scissors is an indoor game or a sweet hand game, which is played by the help of the two different people or different players. Rock Paper Scissors all players are played by the help of making or throw while structure one of three shapes with an outstretched hand. The “rock” beats scissors, the “scissors” beat paper and the “paper” beats rock; if both players make or throw the same shape, the game is tied. Different names for the amusement in the English-talking world incorporate Roshambo, Paper Scissors Stone, Paper Scissor Rock, Scissors Paper Rock, Yuck Ack Ock and different orderings of the three things or items. Rock Paper Scissors rules are shown in below by the help of diagram.
Rock Paper Scissors are design by the help of some digital logic. In Rock Paper Scissors players inputs as well as output are indicated in LED (Light Emitting Diode) or blub. Rock, Scissors, or Paper are indicated by the help of three buttons or switches, if buttons or switches are pressed at the same time than the match will be tied or draw (no winner) in between player P and player Q and if the Player P or Player Q, any one is pressed the switch or buttons of Rock Paper Scissors than LED or bulb emitted or burn. This LED or blub will signify the winner.
In this game player P as well as player Q need a board, twelve switches (push-button or switch spring-return normally-off micro-switches), two bulb (small bulbs or LEDs, and bulb sockets), batteries (and battery holders), wire, wire connectors, screws, tape, drill, screwdriver. Use twelve single-pole switches relatively than six double-pole switches only the reason is that better exhibits how the circuit works properly, which are shown in below by the help of diagram.
In above diagram Player P is shown by the help of Blue as well as Player Q is shown by the help of Brown. Rock Paper Scissors hand game is constructed or completed by the help of some logic gate like AND gate and OR gate (Balabanian and Carlson, 2001). AND gate is connected in series connection in the main circuit board as well as the OR gates are connected in parallel connection in main circuit board, which is already shown in below by the help of diagram.
Everything builds up on the board. If the two players want the board is to be attractive, on the front side put the LED or bulb and switches as well as wires. On the backside of the board put batteries. In the game there is three ways to win of player P as well as player Q. The three ways to win player P are built from three circuits, every circuits has two switches, every player individually choice their switch, wired in series connection. In this game the three ways are represented by the three series circuits as well as the three ways for player P to win are wired in parallel to light up player P’s bulb or LED. The same instructions or rules are followed by the Player Q or at the same way player Q is play Rock Paper Scissors hand game.
This game depends on the age of the players as well as luck. The reason is that the players are able to complete the circuit diagram as well as play the game by themselves.
Rock Paper Scissors hand game is constructed by the help of some computer instructions or commands. Rock Paper Scissors hand game is a non-graphical command-line game. Player P is asked by the program to enter “r” as rock, “s” as scissors or “p” as paper without letting player Q see, then player Q is also asked by the program to enter same as player P “r”, “s”, “p”. Each player wins who figure out the program.
In this game the two players need a computer as well as the programming language software of each player choice.
The partial program in pseudo instructions or codes is given below but not a real programming language. In this program players also use logic gates or operators like “AND” gate as well as “OR” gate. As well as AND gate is connected in series connection and also the OR gates are connected in parallel connection (Chen, 2003).
write “Rock Scissors Paper Game”
loop forever
{
write “Player A, enter r, s, or p: “
read a (see note 1)
write “Player B, enter r, s, or p: “
read b
write “A chose: ” + a
write “B chose: ” + b
if (…you figure out what goes here…)
{
write “A wins”
}
else if (…you figure out what goes here…)
{
write “B wins”
}
else
{
write “nobody wins”
}
}
The two players have an important note that don’t want player Q to see when player P has typed.
The compete program in pseudo instructions or codes, which is given below.
write “Rock Scissors Paper Game”
loop forever
{
write “Player A, enter r, s, or p: “
read a (see note 1)
write “Player B, enter r, s, or p: “
read b
write “A chose: ” + a
write “B chose: ” + b
if ((a=”r” and b=”s”) or (a=”s” and b=”p”) or (a=”p” and b=”r”))
{
write “A wins”
}
else if ((b=”r” and a=”s”) or (b=”s” and a=”p”) or (b=”p” and a=”r”))
{
write “B wins”
}
else
{
write “nobody wins”
}
}
According to above discussion Rock Paper Scissors hand game is constructed and played by the help of two individual players like Player P and Player Q.
References
Balabanian, N. and Carlson, B. (2001). Digital logic design principles. 1st ed. New York: Wiley.
Chen, W. (2003). Logic design. 1st ed. Boca Raton, Fla.: CRC Press.
Eccles, W. (2007). Pragmatic logic. 1st ed. [San Rafael, Calif.]: Morgan & Claypool.
Gates, H. (2004). America behind the color line. 1st ed. New York: Warner Books.
Lorente, N. and Joachim, C. (2013). Architecture and design of molecule logic gates and atom circuits. 1st ed. Berlin: Springer.
Mano, M. and Kime, C. (2000). Logic and computer design fundamentals. 1st ed. Upper Saddle River, NJ: Prentice Hall.
Ridley, J. and Ridley, J. (2004). Mitsubishi FX programmable logic controllers. 1st ed. Oxford: Newnes.