Skip to content

Commit

Permalink
Working on screen creation
Browse files Browse the repository at this point in the history
  • Loading branch information
OrganicPanda committed Apr 10, 2012
1 parent b0c3933 commit 9c3f7d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions public/js/Squabble/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var Squabble = Squabble || {};

// Squabble Game Class. Used to start and manage a game of Squabble
Squabble.Game = function(settings) {
Squabble.Game = function(gameElement, settings) {

// Apply args
this.settings = settings || {};
Expand All @@ -19,10 +19,10 @@ Squabble.Game = function(settings) {
this.util = Squabble.Util;
this.dom = Squabble.Dom;
this.screen = {
splash : new Squabble.Screen.Splash(this),
menu : new Squabble.Screen.Menu(this),
score : new Squabble.Screen.Score(this),
board : new Squabble.Screen.Board(this)
splash : new Squabble.Screen.Splash(this, this.selector('', gameElement)),
menu : new Squabble.Screen.Menu(this, this.selector('', gameElement)),
score : new Squabble.Screen.Score(this, this.selector('', gameElement)),
board : new Squabble.Screen.Board(this, this.selector('', gameElement))
};
this.currentScreenId = null;

Expand Down
5 changes: 4 additions & 1 deletion public/js/Squabble/Screen/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ var Squabble = Squabble || {};
Squabble.Screen = Squabble.Screen || {};

// Squabble Base Screen Class. Extend to create a screen
Squabble.Screen.Base = function(game) {
Squabble.Screen.Base = function(game, screenElement) {

// Store our game controller
this.game = game;

// Store the DOM element that represents this screen
this.element = screenElement;

};

// Show this screen
Expand Down

0 comments on commit 9c3f7d7

Please sign in to comment.