Slide for Four is my entry for the Flutter Puzzle Hack Challenge. You can play the game either by visiting the Website: Slide for Four or by installing the client or the client and the server on your device.
Before following this installtion guide you need to clone this repository. Additionally you need NodeJs and Flutter installed on your device.
You can use the client either with my server, or with a self hosted server.
To use my server:
- Enter the directory
frontend
- Run the command:
flutter pub get
- Run the command:
flutter build web --release --web-renderer html
- Enter the directory
frontend/build
- Run the command:
npm i
- Run the command:
node index.js
- Open your Browser and visit: http://localhost:3000
To use your self hosted server:
- Enter the directory
frontend
- Run the command:
flutter pub get
- Enter the directory
frontend/lib/helper
- Change the
address
inside the fileconfig.dart
tows://localhost:5000
- Run the command:
flutter build web --release --web-renderer html
- Enter the directory
frontend/build
- Run the command:
npm i
- Run the command:
node index.js
- Open your Browser and visit: http://localhost:3000
- Open the directory
backend
- Run the command:
npm i
- Run the command:
node index.js
Instructions on how to play after you already visited the Website. You always need a connection to the server (either mine or a self hosted one).
You can decide between Single- and Multiplayer. In the Singleplayer you play against an AI and in the Multiplayer you can play against a friend. To play the Multiplayer one of you has to create a new game and send the room code to a friend (you can copy it by clicking on the code). The other one has to join this game by entering the code in the text field that appears after clicking on join.
If one of you gets disconnected for whatever reason, reload the app and reconnect to the game by entering the code after clicking on reconnect.
Inside the Game you have to move your tiles by moving the white ones in the appropriate direction. The first one moving four of their own tiles in a row, column or diagonal wins the game.
Now we will have a look at the controls.
On PC you can hover over the white tiles to get buttons that visualize where the tile will move.
On Mobile you have to swipe on top of the white tiles in the direction you want them to move in.
My presentation of the game in video format can be found on youtube: https://www.youtube.com/watch?v=MIHzGOf9Iag