Super - Mario Bros Java Game 240x320

He reached the flagpole just as the screen dimmed. He didn't just slide down a pole; he descended into a sea of "Application Error" text. But as the charger was plugged in and the .jar file re-executed, Mario reset. He was a hero of the 240x320 realm—destined to be played under school desks and on long bus rides, a tiny king in a pocket-sized kingdom.

// Collect coins Iterator<Coin> it = coins.iterator(); while (it.hasNext()) Coin c = it.next(); if (marioX < c.x + c.size && marioX + MARIO_WIDTH > c.x && marioY < c.y + c.size && marioY + MARIO_HEIGHT > c.y) it.remove(); score += 10; super mario bros java game 240x320

// World private ArrayList<Platform> platforms; private ArrayList<Goomba> goombas; private ArrayList<Coin> coins; private int score = 0; private boolean gameOver = false; He reached the flagpole just as the screen dimmed