View Javadoc

1   /*
2      IMPORTANT !!!
3   
4      DO NOT EDIT THIS FILE. IT IS GENERATED FROM APPROPRIATE XML FILE
5      BY THE MessagesGenerator.xslt.
6      MODIFY THAT FILE INSTEAD OF THIS ONE.
7   
8    */
9   package cz.cuni.amis.pogamut.defcon.communication.messages.infos;
10  
11  import cz.cuni.amis.pogamut.base.communication.messages.*;
12  import cz.cuni.amis.pogamut.base.communication.worldview.*;
13  import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
14  import cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation;
15  import cz.cuni.amis.pogamut.defcon.communication.messages.*;
16  import cz.cuni.amis.pogamut.defcon.communication.messages.commands.*;
17  import cz.cuni.amis.pogamut.defcon.communication.messages.infos.*;
18  import cz.cuni.amis.pogamut.defcon.consts.*;
19  import cz.cuni.amis.pogamut.defcon.consts.state.*;
20  import cz.cuni.amis.utils.exception.*;
21  
22  import java.util.*;
23  
24  import javabot.*;
25  
26  
27  /**
28   * Sent whenever the DefCon game begins (game switches to the map and unit-placing phase
29   * begins) or stops.
30   */
31  public class GameRunningChanged extends DefConEvent {
32      /**
33       * Is game running?
34       */
35      private Boolean running = null;
36  
37  /**
38                            Creates new instance of message GameRunningChanged.
39                            
40                  Sent whenever the DefCon game begins (game switches to the map and unit-placing
41                  phase begins) or stops.
42          
43                       @param
44                        running Is game running?
45              @param time
46                   */
47      public GameRunningChanged(Boolean running, double time) {
48          super(time);
49  
50          this.running = running;
51      }
52  
53      /**
54       * Is game running?
55       *
56       * @return Boolean
57       */
58      public Boolean getRunning() {
59          return this.running;
60      }
61  
62      /**
63       * Returns human readable serialization of the message.
64       *
65       * @return human readable string
66       */
67      @Override
68      public String toString() {
69          return "GameRunningChanged[" + getStringizedFields() + "; Running = " + this.running + "]";
70      }
71  
72      /**
73       * Returns message in html format.
74       *
75       * @return html message
76       */
77      public String toHtmlString() {
78          return "<p><b>GameRunningChanged:</b></p>" + "<p><i>Running:</i> " + this.running + "</p>";
79      }
80  }