package com.betato.testgame;

import java.awt.Color;
import java.awt.Graphics;

import com.betato.gamedisplay.Frame;
import com.betato.gamedisplay.GameLoop;
import com.betato.gamedisplay.GameWindow;
import com.betato.gamedisplay.InputListener;

public class TestGame extends GameWindow{
	private static final long serialVersionUID = 1L;
	
	public static void main(String[] args) {
		new TestGame();
	}
	
	int acc;
	int timesUp = 0;
	int timesDown = 0;
	boolean keyState;
	
	public TestGame() {
		start(new GameLoop(60, 120), new Frame(this, 300, 300, "Title", false, false, false));
	}
	
	@Override
	public void onInit() {
		acc = 100;
		frame.setContentSize(300, 300);
	}

	@Override
	public void onUpdate(InputListener inputListener) {
		if (acc < 9999){
			acc++;
		} else {
			acc = 0;
		}
		
		keyState = inputListener.keyState[65];
		if (inputListener.keyUp[65]) {
			timesUp++;
		}
		if (inputListener.keyDown[65]) {
			timesDown++;
		}
	}

	@Override
	public void onRender(Graphics g) {
		g.setColor(Color.white);
		g.fillRect(0, 0, 300, 300);
		g.setColor(Color.black);
		g.drawString("fps:" + fps + " ups:" + ups, 10, 10);
		g.drawString("lalala:" + acc, 10, 30);
		g.drawString("state:" + keyState + " up:" + timesUp + " Down: " + timesDown, 10, 50);
	}

	@Override
	public void onExit() {
		// TODO Auto-generated method stub
		
	}

}

@@ -464,16 +464,44 @@
 yState;%0A
+%09boolean fullscreen = true;%0A
 %09%0A%09publi
@@ -561,16 +561,25 @@
 me(this,
+ %22Title%22,
  300, 30
@@ -581,23 +581,20 @@
 0, 300, 
-%22Title%22
+true
 , false,
@@ -971,16 +971,118 @@
 ++;%0A%09%09%7D%0A
+%09%09if (inputListener.keyUp%5B90%5D) %7B%0A%09%09%09frame.setFullscreen(fullscreen);%0A%09%09%09fullscreen = !fullscreen;%0A%09%09%7D%0A
 %09%7D%0A%0A%09@Ov
@@ -1436,45 +1436,38 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub%0A%09%09
+System.out.println(%22exiting%22);
 %0A%09%7D%0A

Update start method in TestGame and test full screen