#pragma once
#include "Globals.h"

class Match
{
public:
	Match() : _match_length(0) { reset(); }
	Match(int match_length): _match_length(match_length) { reset(); }
	
	int get_match_length() { return _match_length; }
	void set_match_length(int match_length) { _match_length = match_length; }
	int get_score(int pnum) { return _score[pnum]; }
	void incr_score(int pnum, int delta) { _score[pnum] += delta; }

	int get_time_left();
	void start();
	void reset();
	
private:
	int _score[2];
	int _match_length;
	int _end_time;
};
