Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
hexbog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add comments about controll flow
[hexbog.git]
/
main.coffee
diff --git
a/main.coffee
b/main.coffee
index
900295d
..
be83ff2
100644
(file)
--- a/
main.coffee
+++ b/
main.coffee
@@
-225,7
+225,7
@@
init_board_layout = () ->
unless is_top_tile and fw_other is -1
push i + columns[col_num].height + fw_other
# will be dereferenced later
unless is_top_tile and fw_other is -1
push i + columns[col_num].height + fw_other
# will be dereferenced later
- space.neighbors = neighbors.clone() # FIXME ?remove ``.clone()``
+ space.neighbors = neighbors
col_offset += column.height
# convert all space.neighbors arrays from containing space ids to referencing the space
for s in spaces
col_offset += column.height
# convert all space.neighbors arrays from containing space ids to referencing the space
for s in spaces
@@
-599,10
+599,12
@@
score_for = (word) -> Math.round(Math.pow(1.7, word.length))
activate_selection = ->
word = selected_word()
if word.length < 3
activate_selection = ->
word = selected_word()
if word.length < 3
+ # should only happen when trying to blip a word with the keyboard
# FIXME make this a hint
log "Too short: \"#{word}\""
return
unless is_word word
# FIXME make this a hint
log "Too short: \"#{word}\""
return
unless is_word word
+ # should only happen when trying to blip a word with the keyboard
# FIXME make this automatically part of the selection display
log "Not on word list: \"#{word}\""
return
# FIXME make this automatically part of the selection display
log "Not on word list: \"#{word}\""
return
@@
-649,7
+651,7
@@
new_tile = (space, y) ->
space.tile = tile
html_tile.click ->
space.tile = tile
html_tile.click ->
- return if tile.hp < 1
+ return unselect_all() if tile.hp < 1
word = selected_word()
if tile in selected
if selected_word().length > 2 and is_word(word) and tile is selected.last()
word = selected_word()
if tile in selected
if selected_word().length > 2 and is_word(word) and tile is selected.last()