-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbc005f
commit 1f3a4fd
Showing
20 changed files
with
1,041 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,3 @@ | |
*.iws | ||
.idea/ | ||
.vscode/ | ||
|
||
*.mapper.dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'package:flame/game.dart'; | ||
|
||
class BoardGame extends FlameGame {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'package:flame/components.dart'; | ||
|
||
class BoardGrid extends Component {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import 'package:dart_mappable/dart_mappable.dart'; | ||
|
||
part 'table.mapper.dart'; | ||
|
||
@MappableClass() | ||
class GridLocation with GridLocationMappable { | ||
final int x, y; | ||
|
||
GridLocation(this.x, this.y); | ||
} | ||
|
||
@MappableClass() | ||
class GameTable with GameTableMappable { | ||
final Map<GridLocation, TableCell> cells; | ||
final Map<GridLocation, GameBoard> boards; | ||
|
||
GameTable({ | ||
this.cells = const {}, | ||
this.boards = const {}, | ||
}); | ||
} | ||
|
||
@MappableClass() | ||
class TableCell with TableCellMappable { | ||
final List<GameObject> objects; | ||
|
||
TableCell(this.objects); | ||
} | ||
|
||
@MappableClass() | ||
class GameBoard with GameBoardMappable { | ||
final AssetLocation asset; | ||
|
||
GameBoard(this.asset); | ||
} | ||
|
||
@MappableClass() | ||
class GameObject with GameObjectMappable { | ||
final AssetLocation asset; | ||
final String? variation; | ||
|
||
GameObject({ | ||
required this.asset, | ||
this.variation, | ||
}); | ||
} | ||
|
||
@MappableClass() | ||
class AssetLocation with AssetLocationMappable { | ||
final String namespace, id; | ||
|
||
AssetLocation(this.namespace, this.id); | ||
} |
Oops, something went wrong.