private void OnWhiteTapped(object sender, EventArgs e) { if (ToMove == Side.White) { if (WhitePerMove != null) { TimeWhite = TimeWhite.Add(WhitePerMove); } ToMove = Side.Black; } }
private void OnBlackTapped(object sender, EventArgs e) { if (ToMove == Side.Black) { MovesCount++; if (BlackPerMove != null) { TimeBlack = TimeBlack.Add(BlackPerMove); } if (TimeControlMoves != 0 && MovesCount == TimeControlMoves) { TimeWhite = TimeWhite.Add(TimeControlBonus); TimeBlack = TimeBlack.Add(TimeControlBonus); } ToMove = Side.White; } }