aboutsummaryrefslogtreecommitdiff
path: root/src/ch/epfl/xblast/server/Ticks.java
blob: a4c3e74251b00dc6634962c9ff77bfcad0ab91c4 (plain)
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
package ch.epfl.xblast.server;

import ch.epfl.xblast.Time;

/**
 * The Ticks interface defines durations in ticks of time-sensitive aspects of the game.
 *
 * @author Pacien TRAN-GIRARD (261948)
 * @author Timothée FLOURE (257420)
 */
public interface Ticks {

    /**
     * Duration of the death of a player (in ticks).
     */
    int PLAYER_DYING_TICKS = 8;

    /**
     * Duration of the invulnerability of a player (in ticks).
     */
    int PLAYER_INVULNERABLE_TICKS = 64;

    /**
     * Duration of the timer of a bomb (in ticks).
     */
    int BOMB_FUSE_TICKS = 100;

    /**
     * Duration of an explosion (in ticks).
     */
    int EXPLOSION_TICKS = 30;

    /**
     * Duration of crumbling of a wall (in ticks).
     */
    int WALL_CRUMBLING_TICKS = EXPLOSION_TICKS;
    /**
     * Duration of the presence of a bonus (in ticks).
     */
    int BONUS_DISAPPEARING_TICKS = EXPLOSION_TICKS;

    /**
     * Number of ticks per second.
     */
    int TICKS_PER_SECOND = 20;

    /**
     * Duration of a tick (in nanoseconds).
     */
    int TICK_NANOSECOND_DURATION = TICKS_PER_SECOND / Time.NS_PER_S;

    /**
     * Duration of a game (in seconds).
     */
    int GAME_DURATION = 120;

    /**
     * Total number of ticks during a game.
     */
    int TOTAL_TICKS = GAME_DURATION * TICKS_PER_SECOND;

}