Skip to content

Instantly share code, notes, and snippets.

@frodosda
frodosda / Arkanoid.java
Created May 18, 2013 12:40
BreakOut Game Code - Stanford CS106A Assignment 3 - My Solutiion (Comments in Portuguese)
/*
* File: Arkanoid.java
* -------------------
*
* This recreates the BreakOut Game - also known as Arkanoid. After clicking to start the user can control the
* paddle with the mouse and keyboard and has to hit the ball in order to destroy bricks on top.
*
* Some bricks drop stars of diferrent colors. Each color when picked up by the paddle has a different effect.
* The bricks and the items add to the overall score (some stars actually decrease the score when picked up).
*
@frodosda
frodosda / gist:5298076
Created April 3, 2013 02:55
Stanford University Programming Methodology Online Course - Assignment 2 - Pyramid Exercise - My Solution Created Variables x and y (cordinates that change to position the line of bricks in the correct spot) and also a variable called "Floors" that counts the pyramid floors. Then did a for loop where the horizontal line of "bricks" was created i…
/*
* File: Pyramid.java
* O objectivo é criar uma pirâmide centrada horizontalmente no ecrã cujos tijolos vão dimiuindo um a um enquanto sobe.
* A minha estratégia vai ser criar um método que desenhe uma linha horizontal de tijolos e inseri-la num loop
* que vá subindo esta ao mesmo tempo que subtrai os tijolos em 1 cada vez que sobe.
*/
import acm.graphics.*;
import acm.program.*;
import java.awt.*;