Commit graph

186 commits

Author SHA1 Message Date
Gwenhael Le Moine
a9214894a1 void -> empty, second try 2011-07-15 12:28:25 +02:00
Gwenhael Le Moine
1a206770fe void is a js keyword 2011-07-15 12:23:33 +02:00
Gwenhael Le Moine
dcd0c7aaf3 add default 2011-07-15 11:51:09 +02:00
Gwenhael Le Moine
245475656f use jQuery() instead of $() 2011-07-15 11:29:36 +02:00
Gwenhael Le Moine
6e59e385ea order (and discipline) 2011-07-15 08:50:11 +02:00
Gwenhael Le Moine
bcda3f4b2a use keycodes as values for direction enum, simplifies the switch 2011-07-15 08:48:30 +02:00
Gwenhael Le Moine
2bd110a87b add optional level_index parameter 2011-07-14 13:10:52 +02:00
Gwenhael Le Moine
396cefca7d show final alert only once, stop handling event then 2011-07-14 12:57:51 +02:00
Gwenhael Le Moine
b7bb9f32d6 highlight the mysterious nature of the display bug 2011-07-14 12:48:57 +02:00
Gwenhael Le Moine
0a59d7ba9d display_level is called later anyway 2011-07-14 12:48:01 +02:00
Gwenhael Le Moine
7d2bf35c5a factorize event handling 2011-07-14 12:47:10 +02:00
Gwenhael Le Moine
257ff69520 factorized drawing cell on canvas 2011-07-14 10:47:17 +02:00
Gwenhael Le Moine
7113035f06 cosmetics 2011-07-14 10:41:10 +02:00
Gwenhael Le Moine
3e192ee910 move code around to try and make more sense 2011-07-14 10:37:24 +02:00
Gwenhael Le Moine
0534ab04a2 refactoring gone wrong (pulled too early) 2011-07-14 10:31:23 +02:00
Gwenhael Le Moine
d34666810a we know where to find the levels 2011-07-14 10:29:20 +02:00
Gwenhael Le Moine
435498c074 refoctoring II more 2011-07-14 10:28:36 +02:00
Gwenhael Le Moine
92ca178370 refactoring II in progress 2011-07-14 10:24:58 +02:00
Gwenhael Le Moine
f03dfbe4b2 refactoring II "moving things around" 2011-07-14 09:58:21 +02:00
Gwenhael Le Moine
0d07ddd09f move things around (it's getting late, time to stop fiddling with this pointlessly) 2011-07-13 23:00:02 +02:00
Gwenhael Le Moine
42baf07f03 encapsulate everything in initialize_a_star() 2011-07-13 22:57:02 +02:00
Gwenhael Le Moine
fb35f9a22c store dom container name into state 2011-07-13 22:55:43 +02:00
Gwenhael Le Moine
240233cc0e move sprites into state.board_infos + load_sprites() 2011-07-13 22:42:48 +02:00
Gwenhael Le Moine
6323fb94ad move board_infos into state ; remove options 2011-07-13 22:36:20 +02:00
Gwenhael Le Moine
3019da895d increase timeout before drawing first level 2011-07-13 22:21:45 +02:00
Gwenhael Le Moine
1ffabde472 cosmetics 2011-07-13 22:19:35 +02:00
Gwenhael Le Moine
e4dfeb8cec canvas adjustements :
. only draw full board when loading level
. draw only part of the bord each move
. or when switching actors
. + various tweaks
2011-07-13 22:17:50 +02:00
Gwenhael Le Moine
cc452edb3e no need of dummy value 2011-07-13 21:37:57 +02:00
Gwenhael Le Moine
e1d41ce2b2 useless 2011-07-13 21:29:40 +02:00
Gwenhael Le Moine
dca98fdee3 comment 2011-07-13 20:53:52 +02:00
Gwenhael Le Moine
55e6404fae use jQuery instead of getElementById 2011-07-13 20:52:59 +02:00
Gwenhael Le Moine
cf20b6eab4 beau 2011-07-13 20:51:27 +02:00
Gwenhael Le Moine
cea58a9e5b remove debugging stuff 2011-07-13 20:50:32 +02:00
Gwenhael Le Moine
f643329db4 remove unused css classes 2011-07-13 20:48:37 +02:00
Gwenhael Le Moine
e85db4362f refactorign 2011-07-13 20:27:10 +02:00
Gwenhael Le Moine
123d82374b load star when document's ready 2011-07-13 20:26:33 +02:00
Gwenhael Le Moine
68aa4c8849 if html skeleton hasn't been pushed in the DOM it's rather difficult to operate on #facepalm 2011-07-13 20:18:39 +02:00
Gwenhael Le Moine
8581b817d3 FIXME: don't display board until the first move is played 2011-07-13 18:38:28 +02:00
Gwenhael Le Moine
ea9ba295b6 now using canvas
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-07-13 18:34:03 +02:00
Gwenhael Le Moine
4053fcee3a canvas work in progress 2011-07-13 18:17:38 +02:00
Gwenhael Le Moine
1323c934ba pre-canvas, board_infos is global 2011-07-13 18:10:16 +02:00
Gwenhael Le Moine
ee96e8f271 refactor display code, only refresh changed elements 2011-07-13 16:49:47 +02:00
Gwenhael Le Moine
aa465179f8 one function initialize_a_star as the entry point 2011-07-13 16:45:02 +02:00
Gwenhael Le Moine
c2f5154137 emphasis on level's state 2011-07-13 16:31:47 +02:00
Gwenhael Le Moine
f1fb8acfde add style for index.html proper 2011-07-13 16:25:31 +02:00
Gwenhael Le Moine
180e6cf156 head and foot 2011-07-13 16:25:15 +02:00
Gwenhael Le Moine
e9086f56e6 increase width of panels 2011-07-13 16:17:24 +02:00
Gwenhael Le Moine
59b0f96dd5 height known too 2011-07-13 16:15:08 +02:00
Gwenhael Le Moine
492595db8a it's a div already 2011-07-13 16:11:23 +02:00
Gwenhael Le Moine
53f7834a90 the exact width is know 2011-07-13 15:45:27 +02:00