 	
 	public func maxRow() -> Int {
 		var row = 0
-		for (var i = 0; i < rows; ++i) {
-			for (var j = 0; j < columns; ++j) {
+		for (var i = 0; i < rows; i+=1) {
+			for (var j = 0; j < columns; j+=1) {
 				if grid![i, j] != emptySymbol {
 					if i > row {
 						row = i

	
	public func maxColumn() -> Int {
		var column = 0
		for (var i = 0; i < rows; ++i) {
			for (var j = 0; j < columns; ++j) {
				if grid![i, j] != emptySymbol {
					if j > column {
						column = j

		
		for direction in directions {
			for var i: Int = 1; i < rows - 1; i += 1 {
				for var j: Int = 1; j < columns - 1; j += 1 {
					if grid![i, j] == emptySymbol {
						let c = j + 1
						let r = i + 1
