1 /*
2 * Created on May 16, 2003
3 *
4 * To change the template for this generated file go to
5 * Window>Preferences>Java>Code Generation>Code and Comments
6 */
7 package com.mlw.fps.model.business.vo;
8
9
10 /***
11 * @author mwilson
12 *
13 * To change the template for this generated type comment go to
14 * Window>Preferences>Java>Code Generation>Code and Comments
15 */
16 public class PlayerStatus
17 {
18 public static final Integer DEAD = new Integer(-1);
19 public static final Integer ALIVE = new Integer(1);
20
21 private String team;
22 private Player player;
23 private Integer status;
24 private long secondsAlive;
25
26 /***
27 *
28 * @param team
29 * @param player
30 */
31 public PlayerStatus(String team, Player player)
32 {
33 this.team = team;
34 this.player = player;
35 this.status = ALIVE;
36 }
37
38 /***
39 *
40 * @param team
41 * @param player
42 * @param status
43 */
44 public PlayerStatus(String team, Player player, Integer status, long secondsAlive)
45 {
46 this.team = team;
47 this.player = player;
48 this.status = status;
49 this.secondsAlive = secondsAlive;
50 }
51
52 /***
53 * @return
54 */
55 public Player getPlayer()
56 {
57 return player;
58 }
59
60 /***
61 * @return
62 */
63 public Integer getStatus()
64 {
65 return status;
66 }
67
68 /***
69 * @return
70 */
71 public String getTeam()
72 {
73 return team;
74 }
75
76 /***
77 * @param integer
78 */
79 public void setStatus(Integer status, long secondsAlive)
80 {
81 this.status=status;
82 this.secondsAlive = secondsAlive;
83 }
84
85 public PlayerStatus reset(long secondsAlive)
86 {
87 if(ALIVE.equals(status)) this.secondsAlive = secondsAlive;
88 PlayerStatus clone = new PlayerStatus(team, player, status, this.secondsAlive);
89 status = ALIVE;
90
91 return clone;
92 }
93 /***
94 * @return
95 */
96 public long getSecondsAlive()
97 {
98 return secondsAlive;
99 }
100 }
This page was automatically generated by Maven