https://github.com/nicolocurioni96/gameofblockssample
Sample SwiftUI game with Blocks
https://github.com/nicolocurioni96/gameofblockssample
coding-interviews game game-test gucci-test mvp swift swiftui unit-test
Last synced: 3 months ago
JSON representation
Sample SwiftUI game with Blocks
- Host: GitHub
- URL: https://github.com/nicolocurioni96/gameofblockssample
- Owner: nicolocurioni96
- Created: 2022-11-23T13:00:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T08:50:22.000Z (over 2 years ago)
- Last Synced: 2025-03-09T01:13:18.496Z (over 1 year ago)
- Topics: coding-interviews, game, game-test, gucci-test, mvp, swift, swiftui, unit-test
- Language: Swift
- Homepage:
- Size: 1.05 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An Amazing Game of Blocks
We are starting the development of a new game. This is the first iteration, but there will be many others, so don’t consider this to be throw-away code.
The first iteration is targeting an MVP that will work as follows:
- The player is presented with 25 empty squares. Every time that they touch a square, it becomes a coloured block.
- If the square touched was on the bottom row, the block appears and stays where it is.
## Project statuses
| Task | Status |
| ----------- | ------ |
| Narrative 1 | 🟢 |
| Narrative 2 | 🟢 |
| Narrative 3 | 🟢 |
## First Case

## BDD Specs
### Story: Create a simple game
### Narrative #1
```
As player, if the player touches a square on one of the upper rows, the new block appears and then falls down until it meets another block or gets to the bottom row.
```

### Narrative #2
```
If a block is falling in-between two blocks, the block will stop its fall, forming a bridge.
```

### Narrative #3
```
After 10 blocks have been placed, the game ends and the score is calculated : each block is worth 5 points, plus 5 points for each block below it. 10 points for each empty square below a block.
```

## Model Specs
### Game Model
| Property | Type |
| --------------------------- | ------------------------------------------------ |
| `emptyNeighborScore` | `Int` |
| `filledNeighborScore` | `Int` |
| `initialBlockScore` | `Int` |
| `numberOfColumns` | `Int` |
| `numberOfRows` | `Int` |
| `selectedBlocks` | `Array(arrayLiteral: Dictionary())` |
| `scoreArray` | `Array(arrayLiteral: Dictionary())` |
| `finalScore` | `String` |
| `isUserInteractionDisabled` | `Bool` |
| `resultLength` | `Int` |
| `columns` | `Array` |
## Legend
- DONE: 🟢
- WIP: 🟠
- TODO: ⚪️
-
## Get in Touch
[](https://bit.ly/3KHu7Kk)
[](https://bit.ly/42AsPXY)
[](https://bit.ly/3P0ASa8)
[](https://bit.ly/45LlPZY)
[](https://bit.ly/3Uk9ln8)