public void AddNewGame(int blackPlayerID, int whitePlayerID, int creatorID, System.DateTime startDateTime, int timeControl, int gameStatus,
string movesHistory, string boardState, int whiteRestTime, int blackRestTime)
{
try
{
ChessDataSet.GamesRow newRow = gamesTable.NewGamesRow();
newRow.BlackPlayerID = blackPlayerID;
newRow.WhitePlayerID = whitePlayerID;
newRow.CreatorID = creatorID;
newRow.StartDateTime = startDateTime;
newRow.TimeControl = timeControl;
newRow.GameStatus = gameStatus;
newRow.MovesHistory = movesHistory;
newRow.BoardState = boardState;
newRow.WhiteRestTime = whiteRestTime;
newRow.BlackRestTime = blackRestTime;
gamesTable.AddGamesRow(newRow);
gamesAdapter.Update(gamesTable);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}