GithubHelp home page GithubHelp logo

parkrail211 / boxfield Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ics4u-scss/boxfield

0.0 0.0 0.0 17 KB

A template for the creation of a 2D version of CubeField, (also known as cube runner).

C# 100.00%

boxfield's Introduction

BoxField

Make the following changes to the BoxField game we started in class.

  1. Add a second list for the right side so that boxes fall to the right of the first column of boxes, (same y position).

  2. Create a pattern. That is have the boxes generated to the left of the one before it for say 7 boxes, and then generate all boxes to the right of the previous box for 12 boxes, etc.

  3. Add a colour value to the box class and generate a random colour for each box that drops. There are multiple ways to do this.

One way is to create an array of type SolidBrush and fill it with different coloured brushes. When creating a new box generate a random number from 0 up to the number of brushes in the array. Send this value to the object constructor. For example:

Box b = new Box(100, 0, 1);

In the example above the 1 is the random colour value. Then when drawing in the paint method use the brushes array at the index indicated by the colour value in the object to select the desired brush color.

boxfield's People

Contributors

theodot avatar tonytheo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.