Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initializeBoard(highestNumber){
- let tmpBoard = [[], [], []];
- for(let i = 1; i <= highestNumber; i++){
- tmpBoard[0].push(i);
- tmpBoard[1].push(0);
- tmpBoard[2].push(0);
- }
- return tmpBoard;
- }
- function printBoard(board, highestNumber){
- for(let i = 0; i <= highestNumber; i++){
- console.log(`${board[0][i]} | ${board[1][i]} | ${board[2][i]}`);
- }
- }
- function moveBlocks(index, start, end, temp){
- moveBlocks(index - 1, start, temp, end);
- }
- let highestNumber = 3;
- let board = initializeBoard(highestNumber);
- printBoard(board, highestNumber);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement