Questions tagged [2048]

2048 is an open source tile-based puzzle game. Questions with this tag should be either about implementing the game or implementing solving strategies.

Filter by
Sorted by
Tagged with
2
votes
1answer
170 views

AI In 2048 Game, Calculations so slow

Inspired by this answer on stackoverflow for AI implementation in 2048 game. I have been trying to make AI calculate best move by playing the game given specific times in memory preceding by one ...
7
votes
3answers
204 views

2048 graphic game

This game is made for JFrame. You can control using the arrows. The numbers in the cells are the degrees of the number 2. It is possible to change the initial position of the window, its size, and the ...
2
votes
1answer
346 views

2048 game in Python 3

I wrote this 2048 game using Python 3 and pygame a few weeks ago. Since I'm getting into CS this summer, I would like to get some review on how I can improve my code in generel. Any tips and ...
24
votes
3answers
2k views

2048 with GUI in C

0x2048 This is my implementation of the classic game "2048" in C. The instruction to build/run the project (GitHub repo) can be found here. I started with the core game and then built a GUI ...
0
votes
2answers
204 views

2048 Webgame bot

So there is this game 2048. You can play it here I wrote a python script which "plays" the game on the website by clicking the arrow keys. I would like to know what can be improved. Is it a good ...
5
votes
0answers
485 views

2048 AI in Python 3

I am working on an 2048 AI and this is my code so far. In the game 2048 you have a 4x4 grid in that some random so named tiles spawn. Each tile has a number. The lowest number is 2. By using the left,...
8
votes
3answers
769 views

2048 game: logic implementation

The following code implements the logic for moving tiles in the game 2048. The "move"(GameBoard::moveRight(), GameBoard::moveUp(), etc.) methods appear to be duplicating implementation. Any ideas for ...
5
votes
2answers
111 views

2048 style game

I have made a replica of the game 2048. It works exactly how the game should work. However I was just looking to know where I could've possibly cleaned up my code or make it more efficient. ...
3
votes
2answers
130 views

2048 movement calculation

So I programmed 2048 in python3 and a simple solver, which will just target a high numbers on the board (not the best tactic, I know), but I have the problem, that this move calculation is painfully ...
5
votes
1answer
939 views

2048 console game (C#)

So about a week ago I decided to write a simple console version of 2048 game. Well, as you'll see, it came out not that simple... And took a lot more time and practice than expected (should've done it ...
12
votes
1answer
6k views

2048 game written in Python

This is the first time that my code is being reviewed after two years of learning of Python as autodidact. I've never took a course or a class, but I've only read books and seen some videos on youtube....
6
votes
1answer
3k views

2048 console game implementation

So I was asked to do a quick 2048 game with C++ but using only stuff like arrays, structures, functions, pointers without using vectors, lambda and so on. The restrictions are here because it's just a ...
3
votes
1answer
3k views

The 2048 game using C

I've decided to do something about my horrible coding and have thus made a test case for review. I'm not sure how this site works exactly, there are so many rules and they don't seem at all clear, not ...
10
votes
1answer
974 views

CodeFights: Game 2048

Description You are most likely familiar with the game 2048. 2048 is played on a gray 4 × 4 grid with numbered tiles that slide smoothly when a player moves them using one of the four arrow ...
7
votes
1answer
331 views

2048 game - AI can't score more than 256 average

I'm trying to implement AI for 2048 with MiniMax and Alpha-Beta pruning, based on a snake strategy, which seems to be the best as a single heuristics. Unfortunately, AI makes 256 in most games, what ...
4
votes
1answer
442 views

2048 clone in libgdx, handling assets, and OOP overkill?

I have created a 2048 clone, I wanted to take on a simple project since I have never actually finished anything. Now I have, though I'm not a hundred percent happy with the result. Images so you know ...
4
votes
1answer
2k views

Simplified version of 2048 game

I tried to get back into Java by implementing a simplified version of the 2048 game. What I am mainly looking for is ways to reduce code duplication, all of my move functions have a very similar but ...
1
vote
1answer
79 views

Conditionally selecting random element from array

I'm building a clone of 2048 in C with SDL2, and I'm implementing the function that adds a number randomly to an empty cell on the board. The board is representd by a 2-Dim array ...
4
votes
2answers
381 views

C function to move and collapse cells in 2048 game

I'm implementing a clone of 2048 in C with SDL, and I have the following function for performing a movement on a column vector/array ...
7
votes
1answer
215 views

2048 game implementation in Clojure

This is my first Clojure program. If you want to run it locally please check out https://github.com/achikin/game2048-clj core.clj ...