This course design is based on the 2048 mini game design of java language. This game can control the movement of the blocks through the keyboard arrow keys. Players can choose one of the up, down, left, and right directions to move each time. Every time they move, all the number blocks will move. In addition to moving closer in the direction, the system will also randomly appear a number square in the blank place, and the squares of the same number will add up when they move closer or collide. At the same time, there is a score display and the highest score, and a lot of pictures were added later, with a graphical interface, the development is based on the eclipss development platform, and the code runs perfectly.