From 4dad893e86318553655b48496cb88d63fc0483d2 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 18 Jul 2011 17:38:12 +0200 Subject: [PATCH] first characters of a CoffeeScript version --- star.coffee | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 star.coffee diff --git a/star.coffee b/star.coffee new file mode 100644 index 0000000..22acbb5 --- /dev/null +++ b/star.coffee @@ -0,0 +1,30 @@ +sys = require 'sys' + +class StarBoard + cell = + WALL: '#' + BALL: '@' + CUBE: 'H' + VOID: ' ' + GIFT: 'x' + + direction = + UP: 38 + DOWN: 40 + LEFT: 37 + RIGHT: 39 + + collected_gifts = 0 + distance_travelled = 0 + moving_actor = cell.BALL + + height = 9 + width = 16 + + board = "#################@## x#H## x #### ##x ## ## x #### x x x ## x x## x ## ##x x#################" + + display = -> + sys.puts "Hello World!" + +sb = new StarBoard +sb.display