Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==================//
- // Part 1 //
- //==================//
- var userBalance = 0;
- var incrementingScore = 0;
- var scoreDifference = 0;
- // Gets called whenever the money finished tweening to the bottom.
- function addFromCatch(value)
- {
- scoreDifference = 0;
- userBalance += value;
- scoreDifference = userBalance - incrementingScore;
- }
- // Gets called every frame.
- // Time elapsed since the last update is passed into the function(milliseconds)
- function onUpdate({delta})
- {
- if (userBalance > incrementingScore)
- {
- incrementingScore += scoreDifference;
- }
- updateBalance(incrementingScore);
- }
- // You have access to a function updateBalance which
- // takes in a string and sets the ui to that value
- // updateBalance("1");
- //==================//
- // Part 2 //
- //==================//
- function processSlots(input)
- {
- console.log("Output: ");
- };
- // examples input
- var array = [
- [1,0,0,0,1],
- [0,1,0,1,0],
- [0,0,1,0,0]
- ];
- //Output: '1 winning line, scoring 20 points.'
- var array2 = [
- [2,4,2,2,3],
- [1,1,1,4,1],
- [3,3,3,4,2]
- ];
- //Output: '2 winning lines, scoring a total 30 points.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement