there's a problem . I'm make fillword game . And I need to implement a random level generation . Levels now seem static. How can I implement this ? Help me please... Now levels look like this -
var rooms = {
board: [
[ 'U', 'C', 'W', 'G', 'U', 'B', 'T', 'Z', 'Y', 'K', 'C', 'T' ],
[ 'K', 'B', 'N', 'A', 'Z', 'B', 'U', 'J', 'L', 'I', 'D', 'J' ],
[ 'I', 'J', 'S', 'R', 'I', 'A', 'A', 'H', 'A', 'L', 'L', 'D' ],
[ 'T', 'L', 'B', 'A', 'C', 'T', 'P', 'V', 'U', 'H', 'T', 'R' ],
[ 'C', 'O', 'L', 'G', 'O', 'H', 'A', 'W', 'N', 'O', 'V', 'C' ],
[ 'H', 'U', 'A', 'E', 'U', 'R', 'R', 'V', 'D', 'U', 'I', 'N' ],
[ 'E', 'V', 'T', 'T', 'V', 'O', 'T', 'O', 'R', 'S', 'N', 'U' ],
[ 'N', 'E', 'W', 'N', 'W', 'O', 'M', 'F', 'Y', 'E', 'H', 'R' ],
[ 'A', 'B', 'A', 'S', 'E', 'M', 'E', 'N', 'T', 'U', 'U', 'S' ],
[ 'A', 'T', 'T', 'I', 'C', 'Y', 'N', 'Q', 'A', 'U', 'J', 'E' ],
[ 'O', 'C', 'U', 'Y', 'Y', 'E', 'T', 'X', 'C', 'Z', 'O', 'R' ],
[ 'B', 'E', 'D', 'R', 'O', 'O', 'M', 'X', 'M', 'Q', 'X', 'Y' ]
],
words: [
"HOUSE",
"BATHROOM",
"BEDROOM",
"KITCHEN",
"ATTIC",
"BASEMENT",
"APARTMENT",
"GARAGE",
"HALL",
"NURSERY",
"LAUNDRY",
]
};
Can help somebody? There is build of the game - http://ift.tt/1U2fBLf
Aucun commentaire:
Enregistrer un commentaire