<commit_before>var express =require('express');
var path =require('path');
//var mysql =require('mysql');
var bodyParser =require('body-parser');

var app =express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
	extended: true
}));

/*
 * CONSTANTS --------------------------------------------------------------------------------------------------------------
 */



/*
 * REGISTER ---------------------------------------------------------------------------------------------------------------
 */
app.post('/register', function (req, res) {
	
});

/*
 * HOME -----------------------------------------------------------------------------------------------------------------
 */
app.get('/', function (req, res) {
	res.send('Battleship');
});

/*<commit_msg>Class Ship implemented<commit_after>var express =require('express');
var path =require('path');
//var mysql =require('mysql');
var bodyParser =require('body-parser');

var app =express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
	extended: true
}));

/*
 * CONSTANTS --------------------------------------------------------------------------------------------------------------
 */

class Ship{
	constructor (x, y, orientation, length) {
		this.x =x;
		this.y =y;
		this.or = orientation;	// vertical - true, horizontal - false
		this.length = length;
		this.hp =[];

		if (this.len ==5)
			this.type = "Aircraft Carrier";
		else if (this.len ==4)
			this.type = "Battleship";
		else if (this.len ==3)
			this.type = "Submarine";
		else if (this.len ==2)
			this.type = "Cruiser";
		else if (this.len ==1)
			this.type = "Patrol Boat";
		else
			this.type = "Unknown";

		for (var i = this.length - 1; i >= 0; i--) {
			this.hp.push(true);
		}
	}

	get isDead(){
		for (var i = this.hp.length - 1; i >= 0; i--) 
			if (this.hp[i] ==true)
				return false;

		return true;
	}

}



var battles =[],
	users =[];


/*
 * REGISTER ---------------------------------------------------------------------------------------------------------------
 */
app.post('/register', function (req, res) {
	
});

/*
 * HOME -----------------------------------------------------------------------------------------------------------------
 */
app.get('/', function (req, res) {
	res.send('Battleship');
});

/*
{'fraction_non_alphanumeric': 0.4404031551270815, 'fraction_numerical': 0.003943908851884312, 'mean_word_length': 1.170152091254753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3782438', 'n_tokens_mistral': 662, 'n_tokens_neox': 612, 'n_words': 147}