Esempio n. 1
0
 private void EventSink_PlayerUpdated(Player player)
 {
     if (player.Board == World.Boards[1])
     {
         var data = JsonConvert.SerializeObject(player);
         ScriptRunner.Run(this.Browser, ScriptAction.PlayerUpdated, Utility.HtmlEncode(data));
     }
 }
Esempio n. 2
0
        private void EventSink_GifGenerated(int playerIndex, string filePath)
        {
            if (playerIndex == 1)
            {
                ScriptRunner.Run(this.Browser, ScriptAction.GifGenerated, Utility.HtmlEncode(filePath));

                var player = Game.Players[playerIndex];
                Emailer.Send(player, filePath);
            }
        }
Esempio n. 3
0
 private void EventSink_GameUpdated(int timeLeft)
 {
     ScriptRunner.Run(this.Browser, ScriptAction.GameUpdated, timeLeft);
 }
Esempio n. 4
0
 private void EventSink_GameFinished(Player winner)
 {
     ScriptRunner.Run(this.Browser, ScriptAction.GameFinished, winner.Board == World.Boards[1]);
 }
Esempio n. 5
0
 private void EventSink_GameReset()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.GameReset, null);
 }
Esempio n. 6
0
 private void EventSink_GameInitialized()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.GetReady, null);
 }
Esempio n. 7
0
 private void EventSink_GameTriggered()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.CountdownStarted, null);
 }
Esempio n. 8
0
 private void EventSink_GameStarted()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.GameStarted, null);
 }
Esempio n. 9
0
 private void EventSink_GameInitialized()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.BlockNewcomers, null);
 }
Esempio n. 10
0
 private void EventSink_GameReset()
 {
     ScriptRunner.Run(this.Browser, ScriptAction.UnblockNewcomers, null);
 }