Railroad, add more levels

Authored by asagtani on Feb 9 2018, 4:47 PM.

Description

Railroad, add more levels

Added levels with less wagons in sample zone to decrease difficulty.
Total 10 levels are implemented, 5 with 12 wagons in sample zone
and 5 with 20 wagons in sample zone. Each level has 3 sublevels.

Todo:- Fix sample grid display for 12 wagons.

Details

Committed
asagtaniFeb 9 2018, 4:47 PM
Parents
R2:0b2cfc5ebc66: Railroad, fixed highlight visiibility
Branches
Unknown
Tags
Unknown
Restricted Application added a subscriber: jjazeix. ยท View Herald TranscriptFeb 9 2018, 4:49 PM

Is there a way to have it more simple than checking everywhere with %2 or /2 ?

we can create a boolean

easyMode = bar.level % 2 == 0

to check if it has 12 or 20 wagons in sample Grid and then use this variable instead. what do you say?

a better name than easyMode :).
you acn also create a function to compute the uniqueId/imageId because there are a lot of magic numbers.
Having a new dataset variable in the js could also avoid ceil/floor?