下拉刷新
Repository Details
Shared bynavbar_avatar
repo_avatar
HelloGitHub Rating
10.0
2 ratings
2048 Game Based on Bitwise Operations
Claim
Collect
Share
273
Stars
No
Chinese
Shell
Language
Yes
Active
1
Contributors
2
Issues
No
Organization
None
Latest
12
Forks
None
License
More
bitwise-challenge-2048 image
This is a classic 2048 game implemented through bitwise operations. It consists of only one file (.bash), with zero dependencies and less than 200 lines of code. Different from the common way of simulating the game board with a two-dimensional array, this project cleverly uses bitwise operations to manage the game state and logic. The entire 4x4 game board is compressed and stored in a 64-bit integer, and all movements, merges and generations are achieved through bit operations.
Included in:
Vol.112
Tags:
Game
Shell

Comments

Rating:
No comments yet