Use the Alice Program

Use the Alice Program from the link below to complete and save the five projects . http://alice.org/ (should be Alice 2.2 or newer) Assignment 1 Binary Code Game Build a world with three switches (Controls) and a lightbulb (Lights), as seen below. Set the emissive color property of the lightbulb 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 lightbulb (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 moves 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. Hint: You can use the color of the circles (even though they are invisible) as a flag that indicates the correct position of the lever.

#### Related Questions in Basic Computer Science

• ##### Q :Differences between Intel Celeron and

What are the differences between Intel Celeron and Pentium family of Processors?

• ##### Q :Attributes of SSD-s Write down the

Write down the attributes of SSD's?

• ##### Q :Intel Celeron and Pentium family of

Write down the differences between the Intel Celeron and Pentium family of Processors.

• ##### Q :Explanation of SAP or ABAP Give a brief

Give a brief explanation of the term SAP or ABAP.

• ##### Q :Tools for creating and editing

What are the basic tools for creating and editing multimedia?

• ##### Q :In UNIX how devices are represented In

In UNIX how devices are represented?

• ##### Q :Problem on Initialization of processor

The processor that you will be using for this project is the MSP430F5438. The processor comes with an Experimenter’s board, Code Composer Studio, and a debugger module.

1. Familiarize yourself with the processor, what pins it has, and how

• ##### Q :Protection fault handler Describe

Describe briefly the way protection fault handler concludes?

• ##### Q :Explanation of BCD Give a brief

Give a brief explanation of the term BCD.

• ##### Q :Accumulator register of 8085 Briefly

Briefly describe the accumulator register of 8085?

2015 ©TutorsGlobe All rights reserved. TutorsGlobe Rated 4.8/5 based on 34139 reviews.