Reference no: EM131117815
Binary Code Game
Build a world with three switches (Controls) and a light bulb (Lights), as seen below. Set the emissive color property of the light bulb to black (turned-off).
In this game, the positions of the levers on the switches represent a binary code. When a lever is up, it represents 1 (electric current in the switch is high) and when down, 0 (electric current in the switch is low). In the above world, all three levers are up, so the binary code is 111. The correct binary code is chosen at the beginning of the game. (You can enter a given code, and then have a friend try to guess it, or you can use the world-level random number function, as described in Tips & Techniques 6.) The idea is to have the user try to guess the correct binary code that will light up the light bulb (its emissive color will be yellow). To guess the binary code, the user will click on the levers to change their position. Each time the user clicks on a lever, it move s in the opposite direction-up (if currently down) or down (if currently up). When all three switches are in the correct position for the binary code, the bulb will turn on.
Each switch should respond to a mouse-click on the switch. If the handle is down, flip it up. If the handle is up, flip it down. To track the current position of a handle, an invisible circle can be placed on the switch and used as a point of reference. When the handle is above the circle, turn it down. When the handle is below the circle, turn it up. See Exercise 12 for more detail.
Your program must include a Boolean function that determines whether the Boolean code is correct.
Industrial revolution or nationalism
: Make the case that either the Industrial Revolution or nationalism was the most significant force in nineteenth-century world history. Consider the case for the other option, as well, by way of demonstrating why your choice was more significant.
|
Evaluated a number of tools in helping to find solutions
: Your role is to prepare a professional report for the board of directors, demonstrating that you have evaluated a number of tools and methods in helping to find solutions to the issues identified in the scenario above.
|
Discount service stations to several neighboring states
: INTERMEDIATE The Ewing Distribution Company is planning a $100 million expansion of its chain of discount service stations to several neighboring states. This expansion will be financed, in part, with debt issued with a coupon interest rate of 15 ..
|
University in the united states
: When was the University of Pennsylvania founded and was it first official University in the United States?
|
Determines whether the boolean code is correct
: Each switch should respond to a mouse-click on the switch. If the handle is down, flip it up. If the handle is up, flip it down. To track the current position of a handle, an invisible circle can be placed on the switch and used as a point of refe..
|
Law in the us congress
: Outline and explain the basic steps in the process by which a bill becomes a law in the U.S. Congress
|
Describe perspective about the soviet rule
: Take the perspective of a citizen of East Berlin after 1961. Describe your perspective about the Soviet rule, Western freedoms, and hope for the future.
|
Intrinsic value of a firm
: Select a U.S. S&P 500 Company required to submit either 8-K, 10-Q, or 10-K U.S. Securities and Exchange Commission (SEC) reports. Before proceeding to Part Two, submit your firm selection to your instructor and obtain approval; completing this as..
|
What is maggie total profit or loss from a long straddle
: Describe how Maggie could use straddles to speculate on the euro's value. At option expiration, the value of the euro is $1.30. What is Maggie's total profit or loss from a long straddle position? What is Maggie's total profit or loss from a long str..
|