-
For simplicity reasons
- I haven't implemented a
sign in
endpoint. - I chose to send the
user
within the payload. In a real case, I would have used jwt. Because of this decision, theresume
endpoint is aPOST
instead of aGET
. - I chose
redis
as the main storage. In a real minesweeper I would have chosen anotherNoSQL
data base, particularlyMongoDB
.
- I haven't implemented a
-
Known bugs
- When creating a game, in the response you can find the
end
attribute with the default value fortime
. The field should be omitted. SwaggerUI
can't access theaws
instance. That's why I also give you somecurl
s.
- When creating a game, in the response you can find the
-
Things I consider important
- I wrote a custom
GameResponseDto
because I think that the user should never see if a cell is mined or not. With thisdto
I can hide that property. - Even though a
cell
shouldn't know anything about its adjacent cells, I added the attributeNearMines
because in another way, theboard
should keep amap
with this information. So I preferred to give it to thecell
. - By design, a
flagged cell
can't be explored. - Internal errors are never specified to the user.
- The
flag
endpoint is aPUT
because it is idempotent.
- I wrote a custom
-
Extras
- I implemented a memory cache.
- At the beginning of the project, I wondered if using
DDD
withGo
would be nice. I wasn't sure, even thoughDDD
is language agnostic. So I usedDDD
as a proof of concept. The results were nice in my opinion, I will give it another try in the future.
-
Notifications
You must be signed in to change notification settings - Fork 0
agugaillard/minesweeper
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published