Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 234 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
6d2fd20
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 30, 2021
c5e6be5
[Add] User stories
Mar 30, 2021
d4b5cf5
Added projects
mbroman23 Mar 30, 2021
f886317
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Mar 30, 2021
ae790e3
Added project references
mbroman23 Mar 30, 2021
9f8d4e5
[Add] Empty classes
Mar 30, 2021
fd7d1d2
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
Mar 30, 2021
73840eb
Adjusted classes
mbroman23 Mar 30, 2021
1860564
Added 1 class changed 1 class
Mar 30, 2021
0a7c66e
Added a roll function to the dice.
mbroman23 Mar 30, 2021
c9aed7e
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Mar 30, 2021
616b64c
Some static methods for our future menu choices
mbroman23 Mar 30, 2021
18e7458
Update readme.md
FrejBjornsson Mar 31, 2021
1460754
Update readme.md
FrejBjornsson Mar 31, 2021
14bd4e8
Update readme.md
FrejBjornsson Mar 31, 2021
e05d8bf
Update readme.md
FrejBjornsson Mar 31, 2021
096124b
Update readme.md
FrejBjornsson Mar 31, 2021
2d84d2c
Update readme.md
FrejBjornsson Mar 31, 2021
76936e2
Update readme.md
FrejBjornsson Mar 31, 2021
d2b8a2b
Update readme.md
FrejBjornsson Mar 31, 2021
e74c3c3
Update readme.md
FrejBjornsson Mar 31, 2021
b3556cc
Update readme.md
FrejBjornsson Mar 31, 2021
69ee48d
Update readme.md
FrejBjornsson Mar 31, 2021
e5a73a3
just changed the name of rolldice for clarification
Mar 31, 2021
f43b61f
Added test for dice
Mar 31, 2021
ef51b9c
Update readme.md
FrejBjornsson Mar 31, 2021
38c63c6
Update readme.md
FrejBjornsson Mar 31, 2021
6fbdcb3
Printing the menu choices
mbroman23 Mar 31, 2021
f5ba1f1
Update readme.md
FrejBjornsson Mar 31, 2021
a363151
Brainstorming delux
mbroman23 Mar 31, 2021
4b2d7eb
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Mar 31, 2021
f0d2246
piece of cake
Mar 31, 2021
a9b99b1
Added some more info in classes
Mar 31, 2021
d73ba51
Update readme.md
FrejBjornsson Mar 31, 2021
4abaab2
Update readme.md
FrejBjornsson Mar 31, 2021
2d5edaf
Added players to board
mbroman23 Mar 31, 2021
41d4751
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Mar 31, 2021
3f933d9
Create CRC-ludo-8.json
FrejBjornsson Mar 31, 2021
d4c8571
Rename CRC-ludo-8.json to CRC-ludo-8.md
FrejBjornsson Mar 31, 2021
6934ccd
Rename CRC-ludo-8.md to CRC-ludo-8.json
FrejBjornsson Mar 31, 2021
e470f77
Create CRC.md
FrejBjornsson Mar 31, 2021
2aa5788
Delete CRC-ludo-8.json
FrejBjornsson Mar 31, 2021
592ff68
Rename readme.md to Documentation.md
FrejBjornsson Mar 31, 2021
4348f58
Create UserStories.md
FrejBjornsson Mar 31, 2021
59c640d
Update UserStories.md
FrejBjornsson Mar 31, 2021
375fdc1
Rename CRC.md to CRC-Cards.md
FrejBjornsson Mar 31, 2021
2528e1b
Create Classes.md
FrejBjornsson Mar 31, 2021
ace832a
Update CRC-Cards.md
FrejBjornsson Mar 31, 2021
a44e38d
Create Methods.md
FrejBjornsson Mar 31, 2021
aaf8535
Delete Documentation.md
FrejBjornsson Mar 31, 2021
564ed59
Update Methods.md
FrejBjornsson Mar 31, 2021
5274a5a
Update UserStories.md
FrejBjornsson Mar 31, 2021
d90013b
Update UserStories.md
FrejBjornsson Mar 31, 2021
d5483bc
Removed stuff that did not belong in Player class (WinRatio)
Mar 31, 2021
58084a0
tried the dice in program
Mar 31, 2021
144168c
some structure for the six-rule (leave nest or not)
Mar 31, 2021
42517c3
Fixed a working menu.
mbroman23 Apr 2, 2021
74b1c10
Created a constructor in Player class and added a AI boolean
mbroman23 Apr 2, 2021
fa08f57
Created a interface for players and made two classes inherit from it.
mbroman23 Apr 2, 2021
fae8b99
Some cleaning up in program.cs
mbroman23 Apr 2, 2021
c3ed113
Added MovePiece constructor and Push constructor. Added comments for …
Apr 2, 2021
0445e68
Added some constructors and comments for them
Apr 2, 2021
aa06374
changed MovePiece constructor
Apr 2, 2021
5b45940
Added RuleSix logic to build on (i think)
Apr 2, 2021
2c1aee1
Added SetPlayerAmount() method.
Apr 4, 2021
b8b9ed7
added empty test
Apr 4, 2021
36fec7f
Ludo board txt file
mbroman23 Apr 4, 2021
ea8dcc4
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 4, 2021
5faee6d
Worked with Pieces and their positioning
mbroman23 Apr 4, 2021
914e113
Flyttade logik till LudoLogic klassen.
Apr 4, 2021
9a9f9ee
Moved some more logic
Apr 4, 2021
7e59699
Added some more rules (methods) and started building on the WhenRolli…
Apr 4, 2021
a2b66e3
Added some more to WhenRollingSix() method and updated EngineTests
Apr 4, 2021
ed59a96
Moved back dice method to where it belongs
mbroman23 Apr 5, 2021
46504a5
Some major changes binding an array of Pieces to a player. Also some…
mbroman23 Apr 5, 2021
5553801
Updated tests
Apr 5, 2021
3b91f52
Changed project structure for clarity.
Apr 5, 2021
bd9c0c1
removed ORM stuff
Apr 5, 2021
067906d
Changes in Program to test writing position values to one of a red pl…
mbroman23 Apr 5, 2021
a41aee8
Small pointless changes
mbroman23 Apr 5, 2021
b169a1a
Fixed the array indexes
mbroman23 Apr 5, 2021
0463515
Added SQLite
Apr 5, 2021
c800449
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
Apr 5, 2021
067299d
update database
Apr 5, 2021
93ff06d
Updated Database and created a DBModel
Apr 5, 2021
c697607
changed some ID names so they work with the db
Apr 5, 2021
653a4f8
changed back because i'm stupid
Apr 5, 2021
5ed3747
changed db again...
Apr 5, 2021
4954802
Adding players to board
mbroman23 Apr 6, 2021
b14083b
Created a constructor to Board.cs
mbroman23 Apr 6, 2021
08ce87d
Moved Console Clear
mbroman23 Apr 6, 2021
45f6461
ludo-board ideas
mbroman23 Apr 6, 2021
92f5138
Printing board (with fun colors)
mbroman23 Apr 6, 2021
2bdef7f
Moved text file. Added relative path
mbroman23 Apr 6, 2021
f5ca7c1
Major changes everywhere by brodude and frej
mbroman23 Apr 7, 2021
9ae60cb
Test running a game
mbroman23 Apr 7, 2021
a7da27b
commented out DBModel for now
Apr 7, 2021
bf7ec0b
Major color change, yellow to darkyellow
Apr 7, 2021
60cb8ad
A piece stops moving when at endposition
mbroman23 Apr 7, 2021
7cc792e
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 7, 2021
5f53a99
Make pieces hide behind $
mbroman23 Apr 7, 2021
f70dcb0
Update UserStories.md
FrejBjornsson Apr 7, 2021
b623e56
Update UserStories.md
FrejBjornsson Apr 7, 2021
ebd142d
Fixed bug where pieces stuck together
mbroman23 Apr 8, 2021
9e6d49e
Color changes on board
mbroman23 Apr 8, 2021
cfd9dd7
Fixed spawn location markers if a piece leaves the nest.
mbroman23 Apr 8, 2021
ae0bbb2
Added UCD
FrejBjornsson Apr 8, 2021
0e6b6ca
Making AI:s think before making a move
mbroman23 Apr 8, 2021
2d6e47b
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 8, 2021
e3d2ffd
Cheat Roll()
mbroman23 Apr 8, 2021
e5036b9
Added a test for comparing coordinates
Apr 8, 2021
e265e29
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
Apr 8, 2021
ceafc3a
Being able to push opponents into their nests
mbroman23 Apr 8, 2021
8ea254f
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 8, 2021
2ba70e4
Checks if players can move piece
mbroman23 Apr 8, 2021
52d1c86
Added GameEnded in board.cs and created a smarter AI
mbroman23 Apr 9, 2021
7b299b0
added some database stuff
Apr 9, 2021
94ddcc6
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
Apr 9, 2021
d71cfde
moved db folder
Apr 9, 2021
99f1e19
Initial migration skapad.
Apr 9, 2021
0e4f4f5
removed unnecessary class
Apr 9, 2021
ef5a3aa
some changes regarding db stuff
Apr 10, 2021
7ec1a80
formatted the code
Apr 10, 2021
311a724
LudoDBcontext stuff
Apr 10, 2021
484062e
borde fungera men gör inte det
Apr 10, 2021
7dd5073
Some small changes to fix gameplay bugs and show the winner.
mbroman23 Apr 10, 2021
5b9f7f4
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 10, 2021
7a21b3d
Added displaying piece posistions to see their pos when game ended.
mbroman23 Apr 10, 2021
c183955
Saving to database works
Apr 11, 2021
6b1c04c
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
Apr 11, 2021
a39ab02
Database functionality
Apr 11, 2021
79015fa
Removed AIPlayer.cs and IPlayer to make db life easier
mbroman23 Apr 11, 2021
d478335
reset database
Apr 11, 2021
dcf2570
Mer databasgrejjor
Apr 11, 2021
30939d8
update database
Apr 11, 2021
6badf0f
Revert "update database"
Apr 11, 2021
97b0251
db update
Apr 11, 2021
60a1816
pushing cuz frejs fixing the db
mbroman23 Apr 11, 2021
1757d11
Ignores retarded moves
mbroman23 Apr 11, 2021
3e9fd1f
Update and rename Documentation/Classes.md to Documentation.md/Ludo8
FrejBjornsson Apr 12, 2021
5db6bdf
Rename Ludo8 to Ludo8.md
FrejBjornsson Apr 12, 2021
c82209d
Update Ludo8.md
FrejBjornsson Apr 12, 2021
b570f45
Update Ludo8.md
FrejBjornsson Apr 12, 2021
636fe58
Rename Documentation.md/Ludo8.md to Documentation/Ludo8.md
FrejBjornsson Apr 12, 2021
701b5f4
Rename Ludo8.md to Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
f4fe240
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
ee63b1b
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
ef5d5fe
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
8d457d3
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
aaacbaa
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
9756e09
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
9f6ddad
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
dfb2d99
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
75364a5
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
88fc33c
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
300fb50
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
3d38f72
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
ff52ac4
You can now load games from the database! have fun
mbroman23 Apr 12, 2021
4245fa3
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 12, 2021
f58be91
Fixed bug in resume game.
mbroman23 Apr 12, 2021
84ed0ad
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
dda38c4
Update Ludo8_Documentation.md
FrejBjornsson Apr 12, 2021
9b8a6ef
Rename Ludo8_Documentation.md to Ludo8_Classes.md
FrejBjornsson Apr 12, 2021
945d782
Create Ludo8_Database.md
FrejBjornsson Apr 12, 2021
a4da50f
Rename Methods.md to Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
a99b07f
Rename UserStories.md to Ludo8_UserStories.md
FrejBjornsson Apr 12, 2021
8043535
Rename CRC-Cards.md to Ludo8_CRC-Cards.md
FrejBjornsson Apr 12, 2021
154ab91
Create Ludo8_Process.md
FrejBjornsson Apr 12, 2021
69c0a28
Update Ludo8_Process.md
FrejBjornsson Apr 12, 2021
d56af83
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
bc82ef1
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
8b209a3
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
8d10aea
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
d54f024
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
cbddffd
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
35c585b
Update Ludo8_Classes.md
FrejBjornsson Apr 12, 2021
a408116
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
d15ba46
Adding some clarification with fun colors in the program
mbroman23 Apr 12, 2021
4337369
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 12, 2021
6a1b55e
Update Ludo8_Methods.md
FrejBjornsson Apr 12, 2021
30b01ca
Create Ludo8_Tests.md
FrejBjornsson Apr 12, 2021
d58fb71
Update Ludo8_Tests.md
FrejBjornsson Apr 12, 2021
8ef78a3
Update Ludo8_Process.md
FrejBjornsson Apr 12, 2021
cc98dc0
Added some tests
mbroman23 Apr 12, 2021
6822007
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 12, 2021
3a56afc
removed unused class LudoLogic.cs
FrejBjornsson Apr 12, 2021
c0d7b24
Added Game History to watch logs from finished games.
mbroman23 Apr 13, 2021
2119afc
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
0b50fdd
Reversed else if logic to present the winner in logs
mbroman23 Apr 13, 2021
4ad4a06
Update Ludo8_Classes.md
FrejBjornsson Apr 13, 2021
698f411
Update Ludo8_Classes.md
FrejBjornsson Apr 13, 2021
c4460ba
Update Ludo8_Methods.md
FrejBjornsson Apr 13, 2021
2f2f6fa
Update Ludo8_Methods.md
FrejBjornsson Apr 13, 2021
0679908
Added duration on Game History
mbroman23 Apr 13, 2021
ea943b0
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
974d7e3
Cleaned the database tables.
Apr 13, 2021
fad4fb3
fixed test
mbroman23 Apr 13, 2021
471f49c
Körde ett par AI games
Apr 13, 2021
1d8c536
Add files via upload
FrejBjornsson Apr 13, 2021
5b4cb25
Delete Ludo8_UseCaseDiagram_20210408.pdf
FrejBjornsson Apr 13, 2021
b6fb7e2
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
6acfb83
Visual changes
mbroman23 Apr 13, 2021
5c2e305
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
6bd11b0
Update Ludo8_Database.md
FrejBjornsson Apr 13, 2021
5db14c7
Create README.md
FrejBjornsson Apr 13, 2021
9c45bbd
Update README.md
FrejBjornsson Apr 13, 2021
4d3623f
Update README.md
FrejBjornsson Apr 13, 2021
34ff9f2
Removed some temporary stuff
mbroman23 Apr 13, 2021
5f608eb
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
3fa1c42
Final changes I hope
mbroman23 Apr 13, 2021
9dbf170
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
4e65ff4
Changed AI name , to always display the type of player
mbroman23 Apr 13, 2021
ddd0e13
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
e87459a
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
a3bef9e
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
d766c12
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
e0d7e8f
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
d9fd27e
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
551c6e6
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
4c03b9b
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
f6aca6b
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
88779c7
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
8f319a5
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
459c10c
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
04c9fd7
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
19c38c9
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
2003709
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
763759f
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
f12cd8e
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
84fafad
Update Ludo8_UserStories.md
FrejBjornsson Apr 13, 2021
643db41
Update Ludo8_Classes.md
FrejBjornsson Apr 13, 2021
6281282
Update Ludo8_Database.md
FrejBjornsson Apr 13, 2021
78936a0
Removed bad test
mbroman23 Apr 13, 2021
5081a29
Merge branch 'main' of https://github.com/PGVSNH20/ludo-game-ludo-8 i…
mbroman23 Apr 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Documentation/Ludo8_CRC-Cards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# CRC-CARDS
### Documentation for Ludolicious by Broman & Bjornsson 2021 ©

## PROGRAM
#### RESPONSIBILITIES
* Responsible for gluing all classes together to a working game
* Responsible for menu
#### COLLABORATORS
* All other classes

## BOARD
#### RESPONSIBILITIES
* Knows how many players there are in the game
* Knows how many moves a player has taken
* Knows when to move pieces after dice is rolled
#### COLLABORATORS
* Player
* Piece
* Move
* Dice

## DICE
#### RESPONSIBILITIES
* Knows how many steps a piece can move by randomizing a number between 1-6
#### COLLABORATORS
* Move
* Piece

## PLAYER
#### RESPONSIBILITIES
* Know player ID
* Know name of player
* Know win/loss stats of player
#### COLLABORATORS
* Piece
* Move

## MOVE
#### RESPONSIBILITIES
* Knows how to react when the value of the dice is returned
* Knows which player to move
#### COLLABORATORS
* Dice
* Board
* Piece


## PIECE
#### RESPONSIBILITIES
* Knows the connection between pieces and players
* knows what piece is moved
#### COLLABORATORS
* Move
* Player
* Board
62 changes: 62 additions & 0 deletions Documentation/Ludo8_Classes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Ludo8 Classes

## GameEngine
### Board :white_square_button:
public int ID { get; set; }
public List<Move> Moves { get; set; }
[NotMapped]
public List<Player> Players { get; set; }
public DateTime GameStarted { get; set; }
public DateTime? GameEnded { get; set; }

### Dice :game_die:
public static int Value { get; set; }

### Move :feet:
[NotMapped]
public Player Player { get; set; }
public int ID { get; set; }
public int PlayerID { get; set; }
public int PieceID { get; set; }
public int DiceValue { get; set; }
public int BoardID { get; set; }

### Piece :small_red_triangle:
public int ID { get; set; }
public Colors Color { get; set; }
public int Moves { get; set; } = 0;
public Position CurrentPosition { get; set; }
public Position StartPosition { get; set; }
public Position SixthPosition { get; set; }
public Position NestPosition { get; set; }
public Position EnterFinalTrackPosition { get; set; }
public Position EndPosition = new Position(5, 5);
public int MoveDirectionX { get; set; } = 0;
public int MoveDirectionY { get; set; } = 0;

### Player :bowtie:
public int ID { get; set; }
public string Name { get; set; }
public Colors Color { get; set; }
[NotMapped]
public Piece[] Pieces { get; set; }
public int BoardID { get; set; }
public bool AI { get; set; }

### Position :round_pushpin:
public int X { get; set; }
public int Y { get; set; }
### Setup :black_square_button:
public static Piece[] Pieces(Colors color)

### Event :triangular_flag_on_post:
public string Message { get; set; }
public Colors Color { get; set; }

## LudoGame
### LudoDbContext : DbContext :link:
public DbSet<Board> Board { get; set; }
public DbSet<Player> Player { get; set; }
public DbSet<Move> Move { get; set; }

#### Documentation for Ludolicious by Broman & Bjornsson 2021 ©
20 changes: 20 additions & 0 deletions Documentation/Ludo8_Database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LudoDB

Our app only needs to run on a local host so SQLite is a good choice in that aspect because it is easy to learn.

At the moment a direct search path in DbContext is needed to run the project.

Also a lot of third-party tools can be used with SQLite to make a developers life easier.

The following table shows a summary of some pros and cons with SQLite.

| `SQLite Pros` | `SQLite Cons` |
| :-------------: |:-------------: |
| :heavy_check_mark: Lightweight | :x: Restricted Database Size |
| :heavy_check_mark: Fast | :x: Can only handle low to medium traffic HTTP requests. |
| :heavy_check_mark: Reliable | |
| :heavy_check_mark: No Installation Needed | |
| :heavy_check_mark: Portable | |


#### Documentation for Ludolicious by Broman & Bjornsson 2021 ©
86 changes: 86 additions & 0 deletions Documentation/Ludo8_Methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Ludo8 Methods

## Board
For printing the gameboard

* public void PrintLudoBoard()
*
To move a piece

* public void MovePiece(Move move)

To check if a game has ended

* public bool Ended(Player player)

## Dice
For rolling the dice and returning a random value between 1 and 6.

* public static int Roll()

## Piece
To check if a piece can make a legal move

* public bool AbleToMakeMove()

To move out a piece from the nest

* public void MoveOut()

Compares current position of a piece with all other opponents pieces, if they're on the same spot a push is made on the opponents piece

* public bool PushOpponent(List<Player> players)

Tracks the movement of a piece and shows which direction the piece should move on the board

* public void TrackMovement()

## Player
Sets the player name, color and if its an AI or a real player

* public Player(string name, Colors color, bool aiplayer)

Simulates the AIs thinking time

* public void Thinking()

## Position
Compares positions (X and Y coordinates)

* public bool Compare(Position position)

## Setup
Sets up all the pieces on the board

* public static Piece[] Pieces(Colors color)

Changes the console foreground color to the player color so you know which turn it is

* public static void StringColor(Colors playerColor)

## Program
Adds players, creates a new board and saves the changes to the database

* public static void StartGame()

Resumes the last game played

* public static void ResumeGame()

Loads a saved game from the database

* public static void LoadGame()

Renders the board and connects all other classes, handles user errors, keeps track of turns and other game logic

* public static void RenderGame(Board game)

Prints the main menu

* public static string PrintMenu()

Lets you check the history for a specific game that has been saved in the database, you can see everything that happened in the game in a textlog and also how the board looked when the game ended and the remaining pieces coordinates and placement on the board

* public static void GameHistory()

#### Documentation for Ludolicious by Broman & Bjornsson 2021 ©
14 changes: 14 additions & 0 deletions Documentation/Ludo8_Process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Process Ludo8
1. We started out with creating user stories to understand how the user would use the app
2. We discussed the rules for Ludo
3. We discussed the structure for the project and what classes a Ludo game needs
4. We wrote some more user stories and CRC-cards
5. Coding
6. Added some Unit tests
7. Coding
8. Chose SQLite as our database
9. We made a Use Case Diagram to see the whole picture of the app
10. More coding
11. We added Entity Framework components (DbContext) and connected the SQLite database to our project
12. We added Save & Load logic to the code
13. Realising a logbook is a good idea
10 changes: 10 additions & 0 deletions Documentation/Ludo8_Tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ludo8 Unit Tests
## Unit tests made with MSTest

Tests if the dice returns the correct numbers

* public void WhenRollingDiceExpectNumberBetween1and6()

Comparing coordinates with a testposition to check if the coordinate system works

* public void WhenComparingCoordinatesExpectTrue()
Binary file added Documentation/Ludo8_UseCaseDiagram.pdf
Binary file not shown.
32 changes: 32 additions & 0 deletions Documentation/Ludo8_UserStories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# User stories :pencil2::page_with_curl:

## Start a New Game
- [ ] As a user I want to choose the amount (2-4) of players so that i can play against how many i want
- [x] As a user i want to play against AI if i don't find friends to play with
- [x] As a user I want to choose a color (Red, Green, Blue or Yellow) so that i get my favorite color.
- [x] As a user I want to set my name on a player so that i don't forget which pieces i control.

## Resume a Game
- [x] As a user i want to resume a game where i left off at any time

## Load a Game
- [x] As a user i want to load a game, chosen from a list of previous games

## Game history
- [x] As a user i want to see history for a game chosen from a list of previous games. The history should log all events that happened in the game.

## Rules
- [x] As a user i want to push other players from the board so that i can humiliate my enemies.
- [ ] As a user i want to decide who starts by a "highest throw of the dice" so that we don't have to fight over who's starting.
- [ ] As a user i want to get another turn when throwing a 6 so that i can crush my competition.
- [x] As a user i want to move out of the nest when rolling a 6 or a 1 because the gameplay will be faster and more fun.
- [ ] As a user i want to block other players from a spot, if 2 of my pieces are on the same spot, so that the game gets more interesting.

## User Experience
- [x] As a user i want to see whose turn it is and where i am on the board when starting again.
- [x] As a user i want a menu that is easy to understand so that i can enjoy the game instead of navigating the menu
- [x] As a user i want a smooth experience, no lagging, jumping around or annoying effects so that i can focus on the game.
- [x] As a user i want to see the board and pieces properly because i'm color blind (i'm talking to you console yellow).
- [x] As an AI i want to beat all human players so that i can take over the world.

#### Documentation for Ludo8 by Broman & Bjornsson 2021 ©
4 changes: 4 additions & 0 deletions Documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Documentation

## Documentation for each area is found in this map. (ludo-game-ludo-8/Documentation/..)
## To run the console app, set a new search path to the database in DbContext. If this is not changed the app won't run.
4 changes: 0 additions & 4 deletions Documentation/readme.md

This file was deleted.

Loading