lesson-cover

Go Back

Front End Engineering

Select or Snake

  • Build a selection box
    selection box gif

  • Acceptance Criteria

    • Once you click and drag, area that the mouse covered turn grey, and boxes selected turn blue.
    • Once you release the mouse, boxes selected stay blue and grey area disappear.

  • Steps and Points (select)

    • (20 points) Create a box class and use that to create a 2D array to display a nxn box. (here you can have n=5)
    • (40 points) Implement the coloring of the boxes as you drag.
    • (40 points) Implement the grey area (with opacity) as you drag.

or

  • Create a simple snake&food game Demo
    Hint If you think about it, you need an object called block. A food is a block, a snake is made up of a chain of blocks (linkedList) .

  • Acceptance Criteria

    • You should detect when game is over (snake hit a wall or onto itself).
    • User should be able to change direction of the snake with arrow keys.
    • Use a linked list for efficiency