private void buttonDone_Click(object sender, EventArgs e)
{
watch.Stop();
/*Stack<Move> s = new Stack<Move>();
foreach (Move m in madeMoves.Reverse())
s.Push(m.Clone());
moves.Add(new GameStateMoveAction(currentGameState.Clone(), watch.ElapsedMilliseconds, null, s));
*/
List<TimedMove> h = new List<TimedMove>();
foreach (TimedMove m in moveHistory)
h.Add(new TimedMove(m));
moves.Add(new GameStateMoveAction(currentGameState.Clone(), originalGameState, watch.ElapsedMilliseconds, null, h));
buttonDone.Enabled = false;
buttonDone.Visible = false;
buttonUndo.Enabled = false;
buttonUndo.Visible = false;
legalPlays.Clear();
madeMoves.Clear();
unusedDice.Clear();
usedDice.Clear();
moveHistory.Clear();
currentGameState.ChangeTurn();
Render();
this.Refresh();
UpdateControls();
}