-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDTO.cs
47 lines (42 loc) · 1.13 KB
/
DTO.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections.Generic;
namespace SnakeWars.SampleBot
{
public class GameStateDTO
{
public int Turn { get; set; }
public IEnumerable<SnakeDTO> Snakes { get; set; }
public IEnumerable<PointDTO> Walls { get; set; }
public IEnumerable<PointDTO> Food { get; set; }
public SizeDTO BoardSize { get; set; }
public int TurnTimeMilliseconds { get; set; }
}
public class SnakeDTO
{
public IEnumerable<PointDTO> Cells { get; set; }
public string Id { get; set; }
public PointDTO Head { get; set; }
public bool IsAlive { get; set; }
public SnakeDirection Direction { get; set; }
public int Score { get; set; }
public int Weight { get; set; }
public int MaxWeight { get; set; }
}
public enum SnakeDirection
{
None,
Up,
Down,
Left,
Right
}
public struct SizeDTO
{
public int Width { get; set; }
public int Height { get; set; }
}
public struct PointDTO
{
public int X { get; set; }
public int Y { get; set; }
}
}