Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
hexbog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5675554
)
make it a bit easier, more unflipping
author
Jason Woofenden
<jason@jasonwoof.com>
Sun, 3 Nov 2013 10:01:12 +0000
(
05:01
-0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sun, 3 Nov 2013 10:01:12 +0000
(
05:01
-0500)
main.coffee
patch
|
blob
|
history
diff --git
a/main.coffee
b/main.coffee
index
860469d
..
366d54e
100644
(file)
--- a/
main.coffee
+++ b/
main.coffee
@@
-339,11
+339,12
@@
blip_selection = ->
for nei in [neighbors, nneighbors]
if unsink > 0
for i in nei
for nei in [neighbors, nneighbors]
if unsink > 0
for i in nei
- if i.hp is 0 and unsink >= 15
+ if i.hp is 0 and unsink >= 10
i.new_hp = 10
i.new_hp = 10
- unsink -= 15
+ unsink -= 10
i.text = new_letter()
i.dom.html i.text
i.text = new_letter()
i.dom.html i.text
+ for nei in [neighbors, nneighbors]
if unsink > 0
for i in nei
if i.hp > 0 and unsink > 0
if unsink > 0
for i in nei
if i.hp > 0 and unsink > 0
@@
-445,7
+446,7
@@
select_tile = (num) ->
new_tile = (num, x, y) ->
letter = new_letter()
new_tile = (num, x, y) ->
letter = new_letter()
- hp = Math.floor(Math.random() * HP_MAX)
+ hp = 1 + Math.floor(Math.random() * (HP_MAX - 1))
html_tile = $("<div class=\"tile hp#{hp}\" style=\"left: #{x}px; top: #{y}px\" unselectable=\"on\">#{letter}</div>")
$board.append(html_tile)
html_tile = $("<div class=\"tile hp#{hp}\" style=\"left: #{x}px; top: #{y}px\" unselectable=\"on\">#{letter}</div>")
$board.append(html_tile)