Updated gameplay.match package to fit naming conventions
This commit is contained in:
0
src/gameplay/match/.gitignore
vendored
Normal file
0
src/gameplay/match/.gitignore
vendored
Normal file
42
src/gameplay/match/match.java
Normal file
42
src/gameplay/match/match.java
Normal file
@ -0,0 +1,42 @@
|
||||
package gameplay.match;
|
||||
|
||||
import gameplay.input.InputBuffer;
|
||||
import gameplay.entities.*;
|
||||
import gameplay.entities.Character;
|
||||
|
||||
/**
|
||||
* Main class that describes the base structure of the match, with characters, timer and such
|
||||
* @author Victor Azra
|
||||
*
|
||||
*/
|
||||
public class match {
|
||||
|
||||
/**
|
||||
* the number of inputs read for each character, a.k.a. for how many frames the inputs are saved in memory.
|
||||
*/
|
||||
private static final int inputBufferSize = 120;
|
||||
|
||||
private int timer;
|
||||
private InputBuffer inputsP1, inputsP2;
|
||||
private int hpP1, hpP2;
|
||||
private int roundsWonP1, roundsWonP2;
|
||||
private Character p1, p2; //characters of player 1 and 2
|
||||
|
||||
/**
|
||||
* base constructor of the match class.
|
||||
* Initiates a new match with with two given characters
|
||||
*/
|
||||
public match(Character p1, Character p2) {
|
||||
this.timer = 99;
|
||||
this.inputsP1 = new InputBuffer(inputBufferSize);
|
||||
this.inputsP2 = new InputBuffer(inputBufferSize);
|
||||
this.p1 = p1;
|
||||
this.p2 = p2;
|
||||
this.hpP1 = p1.getMaxHP();
|
||||
this.hpP2 = p2.getMaxHP();
|
||||
this.roundsWonP1 = 0;
|
||||
this.roundsWonP2 = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user