
            /**
            IMPORTANT !!!
       
            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
            THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
       
            IMPORTANT END !!!
            */
            package
            cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
	    		import java.util.*;    
    import javax.vecmath.*;    
    import cz.cuni.amis.pogamut.base.communication.messages.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.objects.*;    
    import cz.cuni.amis.pogamut.base.communication.translator.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;    
    import cz.cuni.amis.pogamut.base.exceptions.*;    
    import cz.cuni.amis.pogamut.base3d.worldview.objects.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.*;    
    import cz.cuni.amis.pogamut.ut2004.agent.worldview.objects.*;    
                
            
            /**
              
		Synchronous message. Contains the info about team score.
	
                          Corresponding GameBots message is 
                          TES.
                      
             */
            
            public class
            TeamScore
                    extends GBObjectUpdate
                
	            	implements IGBWorldObjectEvent, IWorldObject
                        
            {
            
            
            
    	/** Example how the message looks like - used during parser tests. */
    	public static final String PROTOTYPE = 
    		"TES {Id null} {Team 0} {Score 0}";
    
            
            /////// Properties BEGIN
            
        /**
        Message identifier. */
        protected
         StringId Id = 
        	null;
        
        
        /**
        Message identifier. */
        public
        StringId getId() {
            return
         Id;
        }
        

        
        /**
        Team identifier. */
        protected
         int Team = 
        	0;
        
        
        /**
        Team identifier. */
        public
        int getTeam() {
            return
         Team;
        }
        

        
        /**
        
			The score of the team (can be some special measurement that
			differs from game type to game type - number of stolen flags
			in CTF game, number of team frags in TeamGame, etc.)
		 */
        protected
         int Score = 
        	0;
        
        
        /**
        
			The score of the team (can be some special measurement that
			differs from game type to game type - number of stolen flags
			in CTF game, number of team frags in TeamGame, etc.)
		 */
        public
        int getScore() {
            return
         Score;
        }
        

        
            /////// Properties END
            
            /////// Extra Java code BEGIN
                        	
            	/////// Additional code from xslt BEGIN            	 
            		
       							protected double Time = 0;
       							
       							protected double getTime() {
       								return Time;
       							}
       							
       							protected void setTime(double time) {
       								this.Time = time;
       							}
       						
       							public double getLastSeenTime() {
       								return Time;
       							}
       						
       					
       					public boolean equals(Object obj) {
	                      if (!(obj instanceof TeamScore)) return false;
	                      TeamScore cast = (TeamScore)obj;
	                      if (this.getId() != null) return this.getId().equals(cast.getId());
	                      else return cast.getId() == null;
	                    }
	                    
	                    public int hashCode() {
	                      if (getId() != null) return getId().hashCode();
	                      return 0;
	                    }
            			
            			
            		
            		
            	/////// Additional code from xslt END            
				                    
	            /////// Extra Java from XML BEGIN
            						
			
            	/////// Extra Java from XML END
            	    
            /////// Extra Java code END
            
            
            
            /**
              * Cloning constructor.
              */
             public TeamScore(TeamScore original) {
                
                     this.Id=original.Id;
                
                     this.Team=original.Team;
                
                     this.Score=original.Score;
                
             }   
             
             
                 /**
                  * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
                  */
	             public TeamScore() {
	             }
             
	    		
	    		/**
	    		 * Here we save the original object for which this object is an update.
	    		 */ 
	    		private IWorldObject orig = null;
	    		
	            public IWorldObject update(IWorldObject obj) {
		            if(obj == null) {
		               orig = this;
		               return this;
		            }
		            orig = obj;
		            // typecast
		            TeamScore  o = (TeamScore)obj;
		            
		            
		                o.Score=Score;
		            
								o.Time = Time;
							
		            
		            return o;
		        }
	        
	            /**
	             * Returns original object (if method update() has already been called, for bot-programmer that is always true
	             * as the original object is updated and then the event is propagated).
	             */ 
		        public IWorldObject getObject() {
		            if (orig == null) return this;
		            return orig;
		        }
	        
                
                 
            public String toString() {
                return
                
                		super.toString() + " | " +
                		
				               "Id = " + 
				               String.valueOf(Id) + " | " +
				            
				               "Team = " + 
				               String.valueOf(Team) + " | " +
				            
				               "Score = " + 
				               String.valueOf(Score) + " | " +
				             "";
                	 
             }
             
             public String toHtmlString() {
                return super.toString() +
             
            "<b>Id</b> : " + 
            String.valueOf(Id) + 
            " <br/> " +
             
            "<b>Team</b> : " + 
            String.valueOf(Team) + 
            " <br/> " +
             
            "<b>Score</b> : " + 
            String.valueOf(Score) + 
            " <br/> " +
             "";
             }            
             
             
             
             }
                         
        