package org.zeroxlab.game;

import android.view.MotionEvent;

import com.stickycoding.rokon.Scene;
import com.stickycoding.rokon.Sprite;
import com.stickycoding.rokon.background.FixedBackground;
import com.stickycoding.rokon.TextureAtlas;
import com.stickycoding.rokon.Texture;

public class GameScene extends Scene {

    private FixedBackground background;
    private Sprite bob;
    private Texture backgroundTexture;
    private Texture bobTexture;

    public GameScene() {
        super(1, 1);

        TextureAtlas atlas = new TextureAtlas();
        backgroundTexture = new Texture("background.png");
        bobTexture = new Texture("bob.png");
        atlas.insert(backgroundTexture);
        atlas.insert(bobTexture);
        atlas.complete();

        setBackground(background = new FixedBackground(backgroundTexture));

        // Create Sprite
        bob = new Sprite(100, 220, bobTexture.getWidth(), bobTexture.getHeight());
        bob.setTexture(bobTexture);

        // Add the Bob sprite to the first layer.
        add(0, bob);
    }

    @Override
    public void onGameLoop() {
    }

    @Override
    public void onTouchDown(float x, float y, MotionEvent event, int pointerCount, int pointerId) {
        // This is called when you press down on the screen.
    }

    @Override
    public void onTouchMove(float x, float y, MotionEvent event, int pointerCount, int pointerId) {
        // This is called when you move your finger over the screen.
        //(ie pretty much every frame if your holding your finger down)

        // Here we'll basically just make Bob follow your finger.
        bob.x = x - (bobTexture.getWidth()/2);
        bob.y = y - (bobTexture.getHeight()/2);
    }

    @Override
    public void onTouchUp(float x, float y, MotionEvent event, int pointerCount, int pointerId) {
        // And this is called when you stop pressing.
    }

    @Override
    public void onPause() {
    }

    @Override
    public void onResume() {
    }

    @Override
    public void onReady() {
    }
}

@@ -435,19 +435,20 @@
 Texture 
-bob
+cell
 Texture;
@@ -449,16 +449,43 @@
 xture;%0A%0A
+    private Board mBoard;%0A%0A
     publ
@@ -639,19 +639,20 @@
         
-bob
+cell
 Texture 
@@ -666,19 +666,20 @@
 exture(%22
-bob
+cell
 .png%22);%0A
@@ -740,19 +740,20 @@
 .insert(
-bob
+cell
 Texture)
@@ -870,105 +870,44 @@
     
-// Create Sprite%0A        bob = new Sprite(1
+mBoard = new Board(2
 00, 
-220, bobTexture.getWidth(), bobTexture.getHeight()
+10, 300, 300
 );%0A 
@@ -913,19 +913,22 @@
         
-bob
+mBoard
 .setText
@@ -931,19 +931,20 @@
 Texture(
-bob
+cell
 Texture)
@@ -945,25 +945,24 @@
 xture);%0A
-%0A
         
 // Add t
@@ -957,49 +957,22 @@
     
-// Add the Bob sprite to the first layer.
+mBoard.show();
 %0A   
@@ -983,19 +983,22 @@
  add(0, 
-bob
+mBoard
 );%0A    %7D
@@ -1493,169 +1493,8 @@
 n)%0A%0A
-        // Here we'll basically just make Bob follow your finger.%0A        bob.x = x - (bobTexture.getWidth()/2);%0A        bob.y = y - (bobTexture.getHeight()/2);%0A
     

Use Board to instead of Bob