Esempio n. 1
0
 public Snake(string id, int initialLength, Point initialPosition, SnakeStatus initialDirection, int maxWeight,
     Size boardSize)
 {
     Id = id;
     _desiredLength = Math.Max(1, initialLength);
     Status = initialDirection;
     _cells.Add(initialPosition);
     _boardSize = boardSize;
     MaxWeight = maxWeight;
     ResetWeight();
 }
Esempio n. 2
0
 public BoardDefinition(int width, int height, IReadOnlyList<Point> walls,
     IReadOnlyList<Point> startingPositions, TimeSpan turnTime, int initialSnakeLength, int maxSnakeWeight, int maxFoodCount, int foodSpawnRate)
 {
     BoardSize = new Size(width, height);
     Walls = walls;
     StartingPositions = startingPositions;
     TurnTime = turnTime;
     InitialSnakeLength = initialSnakeLength;
     MaxSnakeWeight = maxSnakeWeight;
     MaxFoodCount = maxFoodCount;
     FoodSpawnRate = foodSpawnRate;
 }