From 723437315381e033b31dfeed7178a1edbcf928a2 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sat, 6 Dec 2014 08:37:36 +0100 Subject: [PATCH] First working version --- gulpfile.js | 2 +- src/game.coffee | 9 +++++++++ src/main.coffee | 7 +++---- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 src/game.coffee diff --git a/gulpfile.js b/gulpfile.js index 4aef37d..a9e81ed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -23,7 +23,7 @@ gulp.task('server', function() { gulp.task('compile', function() { return gulp.src(['src/*.coffee']) .pipe(sourcemaps.init()) - .pipe(coffee()) + .pipe(coffee({bare: true})) .pipe(uglify()) .pipe(concat('app.js')) .pipe(sourcemaps.write()) diff --git a/src/game.coffee b/src/game.coffee new file mode 100644 index 0000000..d976df2 --- /dev/null +++ b/src/game.coffee @@ -0,0 +1,9 @@ +game = { + start: -> + + step: -> + + resources: + ore: 0 + stone: 100 +} diff --git a/src/main.coffee b/src/main.coffee index cfc6c65..484b819 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -9,12 +9,11 @@ $ -> # TODO: Load images ready: -> - # TODO: Start the game - # TODO: setTimeout? + game.start + this.setState(game) step: -> - # TODO: For internal stuff like progress bar render: -> - # TODO: this.game.render? + this.layer.clear("#333"); })