-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the null idea from the grid and grid generator and adding in…
… the idea of a default empty value that the generator should use when determining what to fill in. Also adding a readme.
- Loading branch information
Showing
5 changed files
with
73 additions
and
18 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
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
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,34 @@ | ||
# Monogame Grid | ||
A grid structure that is meant to be used with monogame projects to help store information about a grid object | ||
in a grid. It is also meant to add common functions that will be used on a grid whether it be a turned based game | ||
to a match three game. | ||
|
||
## Installation | ||
#### Package Manager | ||
```bash | ||
Install-Package MonoGame.Grid | ||
``` | ||
#### .NET CLI | ||
```bash | ||
dotnet add package MonoGame.Grid | ||
``` | ||
#### Paket CLI | ||
```bash | ||
paket add MonoGame.Grid | ||
``` | ||
|
||
## Usage | ||
```csharp | ||
var grid = new Grid<string>() | ||
{ | ||
{ "O", "X", "X" }, | ||
{ "O", "O", "X" }, | ||
{ "O", "X", "O" } | ||
}; | ||
|
||
var item1 = grid[1, 2]; // -- "X" | ||
var item2 = grid[3]; // Is equal to 1, 0 which will return "O"; | ||
var item3 = grid[new Point(1, 2)] // Will use the monogame point structure and will use the x and y like above which will return "X" | ||
``` | ||
|
||
## |