-
Notifications
You must be signed in to change notification settings - Fork 0
/
SavedGame.cs
55 lines (49 loc) · 1.23 KB
/
SavedGame.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
48
49
50
51
52
53
54
55
using System;
using System.Collections.Generic;
namespace Chess
{
// class SavedGame: used to serialize the game so that the board can be loaded when the program next opens
[Serializable]
internal class SavedGame
{
private Piece[,] piecesArray;
private List<Piece> piecesList;
private bool turnSwitch;
private bool computer;
public SavedGame(Piece[,] piecesArray, List<Piece> piecesList, bool turnSwitch, bool computer)
{
this.piecesArray = piecesArray;
this.piecesList = piecesList;
this.turnSwitch = turnSwitch;
this.computer = computer;
}
public Piece[,] PiecesArray
{
get
{
return piecesArray;
}
}
public List<Piece> PiecesList
{
get
{
return piecesList;
}
}
public bool TurnSwitch
{
get
{
return turnSwitch;
}
}
public bool Computer
{
get
{
return computer;
}
}
}
}