using GameModel;
namespace GameHandler
{
public class ThrowHandler
{
public BoardState Init(ThrowMode throwMode)
{
var picture = PinPicture.Create();
return new BoardState(throwMode,picture);
}
///
/// Bild stellen
///
///
///
///
///
public BoardState SetBoardstatePicture(PinPicture boardstate, ThrowMode throwMode)
{
throw new NotImplementedException();
}
///
/// neu autstellen
///
///
///
///
public BoardState Update(BoardState currentState, PinThrow pinThrow)
{
if (currentState.ThrowMode == ThrowMode.Reposition)
{
return currentState with { PinPicture = PinPicture.Create() };
}
else
{
return currentState with { PinPicture = currentState.PinPicture + pinThrow };
}
}
}
}