Master | Develop |
---|---|
The application is provided as an docker image.
docker run terraform.cs.hm.edu:5043/ob-algdatii-ss19-leistungsnachweis-minesweeper:master
docker run terraform.cs.hm.edu:5043/ob-algdatii-ss19-leistungsnachweis-minesweeper:develop
The project is divided into two parts, the Angular frontend and the golang backend. By design it is not possible to get any information about the location of the bombs without uncovering the accoring field. A very simple hint tool is provided which allows getting hints for possible safe or unsafe fields on the playground.
The size of the playground is variable, also the amount of bombs, so you can configure it by your self how difficult it should be.
The Backend hosts a GraphQL API for interacting with the frontend. It provides two query options and two mutations which are explained in the following section. Additional it is able to host a precompiled frontend using static file serving. This files are expected in folder ./web
relatively to the working directory.
State of playground:
query{
get{
win,
rows{
fields{
uncovered,
closebombs,
bomb,
flagged
}
}
}
}
Hint:
query{
hint{
x,
y,
action
}
}
Create playground:
mutation{
init(x: width, y: height, bombs: amount-of-bombs){
rows{
fields{
uncovered,
closebombs,
bomb,
flagged
}
}
}
}
Pass click on field to backend (either uncover or flagging)
mutation{
click(x: x-pos, y: y-pos, flag: boolean){
win,
rows{
fields{
uncovered,
closebombs,
bomb,
flagged
}
}
}
}
The frontend is created using the Angular Toolkit. It interacts with backend using the explained GraphQL actions.