Commit graph

124 commits

Author SHA1 Message Date
Gwenhael Le Moine
834591a9d5 add 'r' key to reload the level 2011-07-07 09:10:00 +02:00
Gwenhael Le Moine
9d060fd25f store the dom element where star will be displayed 2011-07-07 09:09:07 +02:00
Gwenhael Le Moine
3565772ffb split css into themes files + common file
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-07 08:45:51 +02:00
Gwenhael Le Moine
9ed8e81e0a Merge branch 'master' of https://github.com/cycojesus/c-urs_-toil-s 2011-07-07 08:24:31 +02:00
Gwenhael Le Moine
99900da161 alignment 2011-07-06 23:42:40 +02:00
Gwenhael Le Moine
f5f24b4437 fix width of info panel 2011-07-06 23:30:16 +02:00
Gwenhael Le Moine
e939026242 add info panel displaying game's state 2011-07-06 23:28:36 +02:00
Gwenhael Le Moine
5a24e218d1 put star in a div 2011-07-06 23:13:25 +02:00
Gwenhael Le Moine
9ff67413b5 display_level builds a self-contained html part 2011-07-06 23:08:41 +02:00
Gwenhael Le Moine
aad2f4a3e0 displaying characters is optional and off by default 2011-07-06 23:04:46 +02:00
Gwenhael Le Moine
3c79be7be4 OMG graphics!! 2011-07-06 22:47:58 +02:00
Gwenhael Le Moine
469cae4bc1 remove Makefile
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-06 22:40:36 +02:00
Gwenhael Le Moine
8df8821c4f import ngstar themes
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-06 22:40:12 +02:00
Gwenhael Le Moine
a8a9c607eb externalize css
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-06 22:39:48 +02:00
Gwenhael Le Moine
62f57ef3b6 remove debug ; small refactoring 2011-07-06 18:03:47 +02:00
Gwenhael Le Moine
ff61256dff increment distance 2011-07-06 18:01:55 +02:00
Gwenhael Le Moine
912952c300 work on before_kata version 2011-07-06 18:01:02 +02:00
Gwenhael Le Moine
b80b182ad0 major refactor of star.rb 2011-07-06 18:00:35 +02:00
Gwenhael Le Moine
df26d55ad4 count distance. not moves 2011-07-06 16:32:11 +02:00
Gwenhael Le Moine
250752603a add Todo list 2011-07-06 13:51:06 +02:00
Gwenhael Le Moine
f865fa5b20 add .gitignore 2011-07-06 13:47:06 +02:00
Gwenhael Le Moine
c9155cb341 grammar (?) 2011-07-06 13:46:27 +02:00
Gwenhael Le Moine
b0651c3261 same, moves -> distance_travelled 2011-07-06 13:46:01 +02:00
Gwenhael Le Moine
4018177e11 renamed s->moves into s->distance_travelled and change its meaning.
It makes more sense to me now, I can define the goal of the game as "collect all the gifts while travelling the least possible."
2011-07-06 13:44:59 +02:00
Gwenhael Le Moine
a8a00b2ec0 refactor get_pos to move result holder at the end of the parameters 2011-07-06 13:38:26 +02:00
Gwenhael Le Moine
f77ff767c9 alignment 2011-07-05 13:46:17 +02:00
Gwenhael Le Moine
8eb840bb4c indentation 2011-07-05 13:45:13 +02:00
Gwenhael Le Moine
a5e70504df Chrom{e,ium} doesn't know for each -.- 2011-07-05 11:37:15 +02:00
Gwenhael Le Moine
975cf4f6e1 fixed some jslint complaints 2011-07-05 11:12:30 +02:00
Gwenhael Le Moine
98f5851b47 replace if by string.replace 2011-07-05 10:39:56 +02:00
Gwenhael Le Moine
c0d82707cc format_level using regexp replace (a bit over-the-top maybe) 2011-07-05 10:14:15 +02:00
Gwenhael Le Moine
59108f4491 let's declare our variables 2011-07-05 09:54:13 +02:00
Gwenhael Le Moine
f5b2f1300d use for each 2011-07-05 09:47:40 +02:00
Gwenhael Le Moine
f3fce15101 [ "", "" ].join( '' ) is faster than "" + ""
http://code.google.com/p/jslibs/wiki/JavascriptTips#Multiple_string_concatenation
2011-07-05 09:45:14 +02:00
Gwenhael Le Moine
f775d6ec8e single loop in format_level 2011-07-05 09:32:38 +02:00
Gwenhael Le Moine
575f1b92f5 use [] instead of charAt() 2011-07-05 09:18:27 +02:00
Gwenhael Le Moine
5275c5221e typo 2011-07-04 21:18:20 +02:00
Gwenhael Le Moine
bb2cee5dff removing an ugly switch by adding an ugly array :/ 2011-07-04 21:17:14 +02:00
Gwenhael Le Moine
f14b429b17 ; to amek js2-mode happy 2011-07-04 21:10:44 +02:00
Gwenhael Le Moine
0eb514274b correct width of #blackboard 2011-07-04 17:56:53 +02:00
Gwenhael Le Moine
1cb2bba63b center 2011-07-04 17:54:17 +02:00
Gwenhael Le Moine
1153e88fd6 OMG with colors and ungodly slowliness 2011-07-04 17:53:00 +02:00
Gwenhael Le Moine
ff42619fcd refoctoring to have state always as first argument ; fix end of game test 2011-07-04 17:23:22 +02:00
Gwenhael Le Moine
69c1e5d0f5 indentation 2011-07-04 17:19:39 +02:00
Gwenhael Le Moine
56d0ef5335 old C code 2011-07-04 17:19:22 +02:00
Gwenhael Le Moine
b8af3517d8 add n and p to move among levels ; end of game alert 2011-07-04 16:51:03 +02:00
Gwenhael Le Moine
dfba38b71b set focus 2011-07-04 16:43:20 +02:00
Gwenhael Le Moine
424a25cb26 import html5boilerplate
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-04 16:41:02 +02:00
Gwenhael Le Moine
103e17f838 fully functional 2011-07-04 16:40:15 +02:00
Gwenhael Le Moine
a692c31ba7 starting javascript version (for world domination) 2011-07-04 16:11:42 +02:00