draugr_contrib /SDK/api/CSharp/ClassLibrary1/SkyportObserver.cs

Language C# Lines 78
MD5 Hash e99421d02f0baf053c06f57cc4cd6433 Estimated Cost $375 (why?)
Repository https://bitbucket.org/ehvattum/draugr_contrib.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skyport
{
    public interface SkyportObserver
    {

        /**
         * Called when the SkyportConnection
         * is first established. You can keep the
         * object reference for later calls.
         */
        void OnConnectionEstablished(SkyportConnection connection);

        /**
        * Called when the server accepted
        * your handshake.
        */
        void OnHandshakeSuccessful();


        /**
         * Called whenever the server sent
         * an error.
         *
         * @param errorMessage  The error message as sring
         */
        void OnError(string errorMessage);


        /**
         * Called when the initial gamestate
         * (called GAMESTART) with round number
         * 0 arrives.
         *
         * @param mapObject    Contains all information
         * about the board, resources etc.
         */
        void OnGamestart(Map mapObject);


        /**
         * Called whenever a gamestate arrives.
         *
         * @param turnNumber The number of the current turn 
         *
         * @param mapObject Contains all information
         * about the board, resources etc.
         *
         * @param playersOnBattlefield  Contains a list
         * of PlayerData objects that contain
         * information about the players in the game.
         */
        void OnGamestate(long turnNumber, Map mapObject, PlayerData[] playersOnBattlefield);


        /**
         * Called whenever a player performed an action.
         *
         * @param performingPlayerName The name of the player who performed the action
         *
         * @param type the type of the action (e.g. "laser", "move", ...)
         * 
         * @param arguments the rest of the arguments of the action as dictionary
         */
        void OnAction(string performingPlayerName, string type, Dictionary<string, object> arguments);


        /**
         * Called whenever a turn has ended.
         */
        void OnEndturn();
    }
}
Back to Top