Skip to main content

All Questions

Tagged with
10 votes
3 answers
743 views

JavaScript OOD: 2048

I wrote a 2048 game in JavaScript with an object-oriented paradigm. The game board is presented with a two-dimensional array and each tile holds an integer. Here is the implementation: ...
Joji's user avatar
  • 325
4 votes
2 answers
1k views

implement the merge functionality for 2048 with JavaScript

I am trying to implement the game 2048 using JavaScript. I am using a two-dimensional array to represent the board. For each row, it is represented using an array of integers. Here I am focused on ...
Joji's user avatar
  • 325
15 votes
2 answers
4k views

2048 (game) solver

The code contains an AI function, that searches breadth-first all possible moves and get the score of their grids, a depth of 6 is used which makes at most \$4+4^2+...+4^6\$ computed grids. The ...
caub's user avatar
  • 335