38 lines
1003 B
C#
38 lines
1003 B
C#
using GameModel;
|
|
using GameModel.Contract;
|
|
using GameModel.Contracts;
|
|
using GameModel.FreeGame;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GameHandler.GameHandler
|
|
{
|
|
public class FreeGameHandler : IGameHandler
|
|
{
|
|
public const string GAMENAME_FREETRAINING = "Freies Spiel";
|
|
public static string GameName()
|
|
{
|
|
return GAMENAME_FREETRAINING;
|
|
}
|
|
|
|
public int GetCurrentPlayerId(IGameModel gameModel)
|
|
{
|
|
var gm = gameModel as FreeGameModel;
|
|
return gm.PlayerIds.First();
|
|
}
|
|
|
|
public IGameModel InitGameModel(int[] playerIds, IGameSettings gameSettings)
|
|
{
|
|
return new FreeGameModel(playerIds);
|
|
}
|
|
|
|
public IGameModel Update(PinThrow pinThrow, IGameModel gameModel, BoardState boardStateBeforeUpdate)
|
|
{
|
|
return gameModel; // TODO update model
|
|
}
|
|
}
|
|
}
|