Permalink
Browse files

bot images, initial controller

  • Loading branch information...
1 parent 8866af3 commit e94c558019a221afb950996452492cbeb855088e Rebecca Murphey committed Feb 25, 2010
Showing with 40 additions and 0 deletions.
  1. BIN img/autobot.jpg
  2. BIN img/decepticon.jpg
  3. +40 −0 js/Transformers/Controller.js
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,40 @@
+dojo.provide('Transformers.Controller');
+
+dojo.require('Transformers.Bot');
+
+(function(d) {
+ dojo.declare('Transformers.Controller', null, {
+ teams : [{
+ team : 'autobot',
+ evil : false,
+ missiles : 1,
+ guns : 5
+ },
+ {
+ team : 'decepticons',
+ evil : true,
+ missiles : 3,
+ guns : 1
+ }],
+
+ players : [],
+
+ constructor : function() {
+ this.setupButton = d.byId('setup');
+ this.playButton = d.byId('play');
+
+ d.connect(d.byId('setup'), 'click', this, '_setup');
+ d.connect(d.byId('play'), 'click', this, '_play');
+ },
+
+ _setup : function() {
+ d.forEach([this.teams], function(t) {
+ this.players.push(new Transformers.Bot(t));
+ }, this);
+ },
+
+ _play : function() {
+
+ }
+ });
+})(dojo);

0 comments on commit e94c558

Please sign in to comment.