Read how I cloned and improved its quality in this blog. When two tiles with the same number touch, they merge into one This 5 x 5 fast paced version by Gleb Bahmutov was cloned from the 'official' github source authored by Gabriele Cirulli. ' - ' Modifications by Douglas Bliss: ' - Create Tile property to access grid data based on direction ' - Create a single MakeMove function based on direction ' - Call MakeMove function from key handlers ' - ' Tile Property - Accesses grid data based on direction ' (not the most efficient, but it's fast enough here) ' - Private Property Get Tile( ByVal Direction As String, ByVal Row As Long, ByVal Col As Long ) As Long Select Case Direction Case "L" Tile = Range( "State" ).Cells(Row, Col).Value Case "R" Tile = Range( "State" ).Cells(Row, 5 - Col).Value Case "U" Tile = Range( "State" ).Cells(Col, 5 - Row).Value Case "D" Tile = Range( "State" ).Cells( 5 - Col, Row).Value Case Else End Select End Property Private Property Let Tile( ByVal Direction As String, ByVal Row As Long, ByVal Col As Long, ByVal RHS As Long ) Select Case Direction Case "L" Range( "State" ).Cells(Row, Col).Value = RHS Case "R" Range( "State" ).Cells(Row, 5 - Col).Value = RHS Case "U" Range( "State" ).Cells(Col, 5 - Row).Value = RHS Case "D" Range( "State" ).Cells( 5 - Col, Row). Join the numbers and get to the 2048 tile How to play: Use your arrow keys to move the tiles. If you would like to host your own copy of the game, you can purchase a web hosting account with 75% discount for the first year from a reliable hosting company via the following link.Option Explicit ' - ' Excel version of the 2048 web game by Gabriele Cirulli ' Created by Peter Bartholomew & Petros Chatzipantazis ' ' Please distribute freely. The source of the original game by Gabriele Cirulli is available here: The source code can be downloaded from his GitHub page at He added the UNDO option and the session preservation. This particular version was modified by NITIN PATHAK: 19 years! Makes you think what have you achieved in life so far. The guy was 19 years old when he wrote this game. It is inspired by the games Threes! and Veewo Studios' app 1024. The game was originally developed by Gabriele Cirulli as a weekend project. This should be enough to get you out of trouble without risking to stall the game. That's why I was forced to set a limit of 1000 undo entries in order to avoid this issue. If you reach a few tens of thousands of moves, then the local storage database of undo moves gets filled up and the game stalls. The game allows to play well past reaching 2048. The Undo steps are saved in the local storage of the browser and it has its limits. Update: Actually, the above statement has to be revised a bit. Even if you close your browser and reopen it later on the same computer, you will be returned exactly where you've left. It includes an unlimited UNDO, so that you can win more often. Tips how to play efficiently are available here. You can play it on your computer and in the browser of your smartphone. The goal of the game is to reach a state where the value of one of the cells is 2048. If two cells with the same value touch during the process, they will be merged into a single cell and their value will be summed. The occupied cells will be rushed to the empty cells in the particular direction. Use the arrow keys on the keyboard of your computer or swipe in all four directions within the field on your smartphone. The place of the "Undo" and "New Game" buttons was changed after I noticed that I'm clicking the "New Game" button accidentally.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |