Added some comments to comply a little bit more with the cfpt rules

This commit is contained in:
2023-01-25 22:32:43 +01:00
parent 7ac7570470
commit 60b23025f5
5 changed files with 53 additions and 8 deletions
+11 -1
View File
@@ -1,4 +1,13 @@
using System;
/*
* Rohmer Maxime
* STD Project
* 25/01/2023
* V1.0
* Checkout.cs
* Logic base for the checkout object
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -23,6 +32,7 @@ namespace Caisses
}
public void Tick(GraphicalStore store)
{
//If enough client are waiting or if they wait in average more than the crossover time, we need to open a new checkout.
if (!Open && store.AverageWaitingTime > store.CrossoverTime && store.GetEmptyCheckoutCount() == 0 || store.OpenCheckoutCount == 0 || store.WaitingClients.Count > MAX_CAPACITY * 2 && store.GetEmptyCheckoutCount() == 0)
{
Open = true;
+12 -3
View File
@@ -1,4 +1,13 @@
using System;
/*
* Rohmer Maxime
* STD Project
* 25/01/2023
* V1.0
* Client.cs
* Logic base for the client object
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,8 +17,8 @@ namespace Caisses
{
public class Client
{
public const int MAX_SHOPPING_TIME = 70; //Original 100
public const int MIN_SHOPPING_TIME = 5; //Original 10
public const int MAX_SHOPPING_TIME = 100; //Original 100
public const int MIN_SHOPPING_TIME = 10; //Original 10
public enum ClientState
{
+10 -2
View File
@@ -1,4 +1,13 @@
using System;
/*
* Rohmer Maxime
* STD Project
* 25/01/2023
* V1.0
* GraphicalCheckout.cs
* A graphical override for the checkout object
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
@@ -13,7 +22,6 @@ namespace Caisses
private Color _color;
private Size _size;
private Rectangle _area;
private Random Random;
public Point Position { get => _position; set => _position = value; }
public Color Color { get => _color; set => _color = value; }
+10 -1
View File
@@ -1,4 +1,13 @@
using System;
/*
* Rohmer Maxime
* STD Project
* 25/01/2023
* V1.0
* GraphicalClient.cs
* A graphical override for the client object
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
+10 -1
View File
@@ -1,4 +1,13 @@
using System;
/*
* Rohmer Maxime
* STD Project
* 25/01/2023
* V1.0
* GraphicalStore.cs
* The model of the application that setups all the clients and the checkouts while communicating everything to the vue
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;