Skip to content

Commit d2ac7d6

Browse files
committed
Add features and technical details about puzzl
1 parent 9623659 commit d2ac7d6

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,35 @@ export PATH=$PATH:$GOPATH/bin
2828
* Press 'h' or 'H' to get any hint for next move.
2929
* Press ESC key to quit the game.
3030

31+
####Features
32+
* puzzl comes with an [in-built solver](#in-built-solver) that powers the automation for the game.
33+
* puzzl gives you some hope by showing the optimal possible moves to solve any board configuration.
34+
* puzzl helps you survive the game by giving [hints](#hints-policy) for next move.
35+
* puzzl tracks all the user moves and accordingly generates [score](#scoring-policy) for the game.
36+
* puzzl shows [notifications](#notification-mechanism) according to the real time game status.
37+
* puzzl notifies that whether your last move was right or wrong.
38+
39+
####In-built Solver
40+
* puzzl uses A-star algorithm to solve the game board.
41+
* puzzl's solver is enough fuel-efficient that it can solve the hardest 3x3 puzzle in 31 moves. Exactly what the [ideal solvability condition](http://en.wikipedia.org/wiki/15_puzzle#Solvability) asks for.
42+
43+
####Hints Policy
44+
* You will get a maximum of 3 hints per game session. No more cheatings. :oncoming_police_car:
45+
46+
####Scoring Policy
47+
* puzzl has its own scoring system. It measures the real time game score using two parameters, one is *total played game moves (T-score)* and another is *accumulated correct score (A-score)* from all the moves.
48+
* Whenever a user moves in a correct direction as the solver would have moved, the *A-score* increases by 1 and decreases by 1 when the user moves in a wrong direction.
49+
* The score of game at any point of time is calculated by this function. [ score = A-score / T-score ]
50+
* This way the maximum score of 1 would be possible in only one situation when the user traverse the game's state space in the right direction all the time.
51+
52+
####Notification Mechanism
53+
* puzzl uses a combination of *goroutines* and *channels* to deliver real time notifications in the game.
54+
* Here you can see all the [available notifications](https://github.com/pravj/puzzl/blob/development/notification/notification.go#L5-L14).
55+
56+
####Dependencies
57+
* [termbox-go](https://github.com/nsf/termbox-go) - Text based graphic user interface for the game.
58+
* [Box-drawing characters](http://en.wikipedia.org/wiki/Box-drawing_character) for drawing different sections.
59+
3160
---
3261

3362
Built with *Muzi* and *Coffee* by [Pravendra Singh](https://twitter.com/hackpravj)

puzzl.gif

9.7 KB
Loading

0 commit comments

Comments
 (0)