mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-14 05:55:00 -04:00
Added comments and made code more readable
This commit is contained in:
parent
00cdb1e5ad
commit
ae67a9dc23
1 changed files with 2 additions and 1 deletions
|
@ -6,13 +6,14 @@ Rand = require './rand'
|
|||
module.exports = class Thang
|
||||
@className: "Thang"
|
||||
@random = new Rand 0
|
||||
# Random ordering for each sprite name
|
||||
@ordering: (spriteName) ->
|
||||
Thang.orders ?= {}
|
||||
names = thangNames[spriteName]
|
||||
if names
|
||||
len = names.length
|
||||
array = Thang.orders[spriteName]
|
||||
if !array?
|
||||
if not array?
|
||||
array = @random.randArray len
|
||||
Thang.orders[spriteName] = array
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue