The goal of the application is to create a javascript version of tetris that uses object oriented programming to solve the problem.
As a user, I should be able to:
- Start the game
- get a random falling shape every x seconds
| // npm install --save twitter dotenv sentiment | |
| require('dotenv').config(); | |
| const Twitter = require('twitter'); | |
| const sentiment = require('sentiment'); | |
| const rpio = require('rpio'); | |
| const Promise = require('bluebird'); | |
| function delay(ms) { | |
| var deferred = Promise.pending(); |
| import RPi.GPIO as GPIO | |
| import time | |
| led = 11 | |
| GPIO.setmode(GPIO.BOARD) | |
| GPIO.setup(led, GPIO.OUT) | |
| GPIO.output(led, GPIO.HIGH) | |
| time.sleep(2) |
Most web developer work exclusively in a linux like environment (don't worry mac users, macOS is very similar to linux under the covers). If you have a Windows machine and want to do web development, the easiest way to get started is to install linux on your computer. We will do the install using a virtual machine called VirtualBox and a linux distribution called Ubuntu.
Learn and be able to apply conditionals, loops, and switch statements to problem solving. Learning the syntax will be the first step, but once you've got that down, focus on problem solving.
Conditionals control the flow of a program. Conditionals decide which code statements gets run based on some input to the conditional. An example from everyday life would be:
Write a function that takes two strings as arguments and returns a string containing only the characters found in both strings. Write 2 versions – one that is O(n) and one that is O(n^2).
O(n^2) Solution
def common_characters_O_of_N2(string1, string2)
common = {}