Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.gwynbleidd.verstkagame;
- import android.app.Dialog;
- import android.content.Context;
- import android.content.res.Resources;
- import android.graphics.Bitmap;
- import android.graphics.BitmapFactory;
- import android.graphics.Canvas;
- import android.graphics.Color;
- import android.graphics.Paint;
- import android.view.MotionEvent;
- import android.view.View;
- import android.widget.ImageView;
- import android.widget.Toast;
- import com.example.gwynbleidd.verstkagame.UnitClasses.Humans.Archer;
- import com.example.gwynbleidd.verstkagame.UnitClasses.Humans.Mage;
- import com.example.gwynbleidd.verstkagame.UnitClasses.Unit;
- public class BattleField extends View {
- Resources resources;
- Context context;
- Integer cellWidth = 1;
- Integer cellHeight = 1;
- Integer indexOfCellY = 8;
- Integer indexOfCellX = 6;
- Integer deltaScreenX = 0;
- Integer deltaScreenY = 0;
- Integer indexOfCellOnClickY;
- Integer indexOfCellOnClickX;
- Integer width;
- Integer height;
- Integer previousIndexOfCellY = 8;
- Integer previousIndexOfCellX = 6;
- Integer befpreviousIndexOfCellX = 6;
- Integer befpreviousIndexOfCellY = 8;
- Integer[][] matrix = new Integer[7][9];
- Unit[][] unitMatrix = new Unit[7][9];
- Bitmap frame;
- Bitmap board1;
- Bitmap redImage;
- Bitmap blueImage;
- //Bitmap archImage;
- // Bitmap arch2Image;
- Bitmap red2Image;
- Bitmap armor;
- Bitmap turn;
- Bitmap turn2;
- Bitmap iconattack;
- Bitmap btnMenuImage;
- ImageView imageView;
- OurButton btnTurn;
- OurButton btnMenu;
- Boolean TurnOfSide;
- Canvas canvas;
- public long startTime1 = 0;
- public long elapsedTime1 = 0;
- MotionEvent previousEvent;
- Boolean DoubleClickCheck;
- Integer Unitx;
- Integer UnitY;
- Boolean DrawPermissed = false;
- Boolean UnitChosen = false;
- Bitmap groundImage;
- Bitmap blue2Image;
- Bitmap groundCellImage;
- public Integer getCellWidth() {
- return cellWidth;
- }
- public void setCellWidth(Integer cellWidth) {
- this.cellWidth = cellWidth;
- }
- public Integer getCellHeight() {
- return cellHeight;
- }
- public void setCellHeight(Integer cellHeight) {
- this.cellHeight = cellHeight;
- }
- public Integer getIndexOfCellY() {
- return indexOfCellY;
- }
- public void setIndexOfCellY(Integer indexOfCellY) {
- this.indexOfCellY = indexOfCellY;
- }
- public Integer getIndexOfCellX() {
- return indexOfCellX;
- }
- public void setIndexOfCellX(Integer indexOfCellX) {
- this.indexOfCellX = indexOfCellX;
- }
- public Integer getDeltaScreenX() {
- return deltaScreenX;
- }
- public void setDeltaScreenX(Integer deltaScreenX) {
- this.deltaScreenX = deltaScreenX;
- }
- public Integer getDeltaScreenY() {
- return deltaScreenY;
- }
- public void setDeltaScreenY(Integer deltaScreenY) {
- this.deltaScreenY = deltaScreenY;
- }
- Paint p;
- Unit redUnit;
- Unit blueUnit;
- Archer archer;
- Paint pBlack;
- Paint pGreen;
- Paint pYellow;
- Paint pText;
- Paint pHealthBar;
- Paint pHealthBarBounds;
- Paint pRed;
- Dialog menu;
- public BattleField(Context context, Integer width, Integer height, Integer[][] matrix1, Integer[][] matrix2, String[][] nameMatrix, Integer[][] HPMatrix, Boolean[][] canAttackMatrix, Boolean[][] OWNERmatrix, Integer[][] VALUABLEMOVEMatrix, Dialog menu) {
- super(context);
- this.context = context;
- this.menu = menu;
- this.cellWidth = width / 8;
- this.cellHeight = height / 12;
- this.deltaScreenX = width / 8;
- this.deltaScreenY = height / 6;
- this.width = width;
- this.height = height;
- this.resources = getResources();
- this.startTime1 = System.currentTimeMillis();
- turn = BitmapFactory.decodeResource(resources, R.drawable.turn);
- turn2 = BitmapFactory.decodeResource(resources, R.drawable.turn2);
- btnTurn = new OurButton(turn, turn2, resources, cellWidth * 2, cellHeight / 2);
- board1 = BitmapFactory.decodeResource(resources, R.drawable.board1);
- btnMenuImage = BitmapFactory.decodeResource(resources, R.drawable.gear);
- btnMenu = new OurButton(btnMenuImage, btnMenuImage, resources , width / 17, height / 33);
- frame = BitmapFactory.decodeResource(resources, R.drawable.cutramka);
- frame = Bitmap.createScaledBitmap(frame, cellWidth, cellHeight, false);
- redImage = BitmapFactory.decodeResource(resources, R.drawable.mage);
- blueImage = BitmapFactory.decodeResource(resources, R.drawable.swordman);
- //archImage = BitmapFactory.decodeResource(resources, R.drawable.archer);
- blue2Image = BitmapFactory.decodeResource(resources, R.drawable.swordman2);
- //arch2Image = BitmapFactory.decodeResource(resources, R.drawable.archer2);
- groundImage = BitmapFactory.decodeResource(resources, R.drawable.ground_test);
- groundCellImage = Bitmap.createScaledBitmap(groundImage, cellWidth, cellHeight, false);
- red2Image = BitmapFactory.decodeResource(resources, R.drawable.mage2);
- armor = BitmapFactory.decodeResource(resources, R.drawable.armor);
- iconattack = BitmapFactory.decodeResource(resources, R.drawable.iconattack);
- // redUnit = new Unit("red", resources, cellWidth, cellHeight, redImage, groundCellImage, false, 10, 10, 0, 2, 1, 100);
- // blueUnit = new Unit("blue", resources, cellWidth, cellHeight, blueImage, groundCellImage, false, 20, 5, 0, 2, 1, 100);
- // archer = new Archer("blue", resources, cellWidth, cellHeight, groundCellImage, false, 10, 10, 0, 2, 1);
- DoubleClickCheck = false;
- TurnOfSide = true;
- /* for (int i = 0; i < 6; i++) {
- this.matrix[i][0] = 1;
- this.unitMatrix[i][0] = new Archer("blarcher", getResources(),cellWidth, cellHeight, archImage, false,10,5,0,2,1);
- }
- for (int i = 0; i < 6; i++) {
- this.matrix[i][1] = 1;
- this.unitMatrix[i][1] = new Unit("blue", getResources(),cellWidth, cellHeight, blueImage, false,25,5,0,1,2);
- }
- for (int i = 0; i < 6; i++) {
- this.matrix[i][6] = 1;
- this.unitMatrix[i][6] = new Unit("red", getResources(),cellWidth, cellHeight, redImage, false,15,10,0,1,2);
- }
- for (int i = 0; i < 6; i++) {
- this.matrix[i][7] = 1;
- this.unitMatrix[i][7] = new Archer("rarcher", getResources(),cellWidth, cellHeight, archImage, false,10,5,0,2,1);
- } */
- if (VALUABLEMOVEMatrix == null || nameMatrix == null || OWNERmatrix == null || HPMatrix == null || canAttackMatrix == null) {
- //Расстановка второго игрока
- for (int i = 0; i < 7; i++) {
- for (int j = 0; j < 4; j++) {
- if (matrix2[i][j] == 0) {
- this.unitMatrix[i][j] = new Unit("ground", resources, cellWidth, cellHeight, groundCellImage, true);
- } else if (matrix2[i][j] == 1) {
- this.unitMatrix[i][j] = new Mage("Mage", resources, cellWidth, cellHeight, red2Image, groundCellImage, false, 15, 10, 0, 2, 2);
- this.unitMatrix[i][j].Owner = false;
- } else if (matrix2[i][j] == 2) {
- this.unitMatrix[i][j] = new Unit("Swordman", resources, cellWidth, cellHeight, blue2Image, groundCellImage, false, 25, 5, 0, 1, 2, 100);
- this.unitMatrix[i][j].Owner = false;
- } else if (matrix2[i][j] == 3) {
- this.unitMatrix[i][j] = new Archer("Archer", resources, cellWidth, cellHeight, groundCellImage, false, 25, 5, 0, 2, 2);
- this.unitMatrix[i][j].Owner = false;
- }
- }
- }
- //Расстановка первого игрока
- for (int i = 0; i < 7; i++) {
- for (int j = 4; j < 9; j++) {
- if (matrix1[i][j] == 0) {
- this.unitMatrix[i][j] = new Unit("ground", resources, cellWidth, cellHeight, groundCellImage, true);
- } else if (matrix1[i][j] == 1) {
- this.unitMatrix[i][j] = new Mage("Mage", resources, cellWidth, cellHeight, redImage, groundCellImage, false, 15, 10, 0, 2, 2);
- this.unitMatrix[i][j].Owner = true;
- } else if (matrix1[i][j] == 2) {
- this.unitMatrix[i][j] = new Unit("Swordman", resources, cellWidth, cellHeight, blueImage, groundCellImage, false, 25, 5, 0, 1, 2, 100);
- this.unitMatrix[i][j].Owner = true;
- } else if (matrix1[i][j] == 3) {
- this.unitMatrix[i][j] = new Archer("Archer", resources, cellWidth, cellHeight, groundCellImage, false, 25, 5, 0, 2, 2);
- this.unitMatrix[i][j].Owner = true;
- }
- }
- }
- } else {
- for (int i = 0; i < 7; i++) {
- for (int j = 0; j < 9; j++) {
- if (nameMatrix[i][j].equals("Archer")) {
- if (OWNERmatrix[i][j])
- this.unitMatrix[i][j] = new Archer("Archer", resources, cellWidth, cellHeight, groundCellImage, false, 25, 5, 0, 2, 2);
- else
- this.unitMatrix[i][j] = new Archer("Archer", resources, cellWidth, cellHeight, groundCellImage, false, 25, 5, 0, 2, 2);
- this.unitMatrix[i][j].HP = HPMatrix[i][j];
- this.unitMatrix[i][j].canAttack = canAttackMatrix[i][j];
- this.unitMatrix[i][j].Owner = OWNERmatrix[i][j];
- this.unitMatrix[i][j].VALUABLEMOVE = VALUABLEMOVEMatrix[i][j];
- } else if (nameMatrix[i][j].equals("Swordman")) {
- if (OWNERmatrix[i][j])
- this.unitMatrix[i][j] = new Unit("Swordman", resources, cellWidth, cellHeight, blueImage, groundCellImage, false, 25, 5, 0, 1, 2, 100);
- else
- this.unitMatrix[i][j] = new Unit("Swordman", resources, cellWidth, cellHeight, blue2Image, groundCellImage, false, 25, 5, 0, 1, 2, 100);
- this.unitMatrix[i][j].HP = HPMatrix[i][j];
- this.unitMatrix[i][j].canAttack = canAttackMatrix[i][j];
- this.unitMatrix[i][j].Owner = OWNERmatrix[i][j];
- this.unitMatrix[i][j].VALUABLEMOVE = VALUABLEMOVEMatrix[i][j];
- } else if (nameMatrix[i][j].equals("Mage")) {
- if (OWNERmatrix[i][j])
- this.unitMatrix[i][j] = new Mage("Mage", resources, cellWidth, cellHeight, redImage, groundCellImage, false, 15, 10, 0, 2, 2);
- else
- this.unitMatrix[i][j] = new Mage("Mage", resources, cellWidth, cellHeight, red2Image, groundCellImage, false, 15, 10, 0, 2, 2);
- this.unitMatrix[i][j].HP = HPMatrix[i][j];
- this.unitMatrix[i][j].canAttack = canAttackMatrix[i][j];
- this.unitMatrix[i][j].Owner = OWNERmatrix[i][j];
- this.unitMatrix[i][j].VALUABLEMOVE = VALUABLEMOVEMatrix[i][j];
- } else
- this.unitMatrix[i][j] = new Unit("ground", resources, cellWidth, cellHeight, groundCellImage, true);
- }
- }
- }
- p = new Paint();
- Timer t = new Timer(this, Integer.MAX_VALUE, 100);
- t.start();
- pBlack = new Paint();
- pBlack.setColor(Color.BLACK);
- pBlack.setStrokeWidth(width / 150);
- pYellow = new Paint();
- pYellow.setColor(Color.YELLOW);
- pYellow.setStrokeWidth(width / 150);
- pYellow.setStyle(Paint.Style.STROKE);
- pGreen = new Paint();
- pGreen.setColor(Color.GREEN);
- pGreen.setStrokeWidth(width / 150);
- pGreen.setStyle(Paint.Style.STROKE);
- pRed = new Paint();
- pRed.setColor(Color.RED);
- pRed.setStrokeWidth(width / 150);
- pRed.setStyle(Paint.Style.STROKE);
- pHealthBarBounds = new Paint();
- pHealthBarBounds.setColor(Color.BLACK);
- pHealthBarBounds.setStyle(Paint.Style.STROKE);
- pHealthBarBounds.setStrokeWidth(width / 170);
- pHealthBar = new Paint();
- pHealthBar.setColor(Color.RED);
- pHealthBar.setStyle(Paint.Style.FILL);
- pHealthBar.setStrokeWidth(width / 200);
- pText = new Paint();
- pText.setTextSize(cellHeight * 0.3f);
- board1 = Bitmap.createScaledBitmap(board1, width, height, false);
- armor = Bitmap.createScaledBitmap(armor, cellWidth * 2 / 3, cellHeight * 2 / 3, false);
- iconattack = Bitmap.createScaledBitmap(iconattack, cellWidth * 2 / 3, cellHeight / 3, false);
- }
- @Override
- protected void onDraw(Canvas canvas) {
- canvas.drawBitmap(board1, 0f, 0f, p);
- btnMenu.draw(canvas, width * 16 / 17f, 0f);
- this.canvas = canvas;
- for (int i = 0; i < 9; i++) {
- canvas.drawLine(deltaScreenX, i * cellHeight + deltaScreenY, canvas.getWidth() - deltaScreenX, i * cellHeight + deltaScreenY, pBlack);
- }
- for (int i = 0; i < 7; i++) {
- canvas.drawLine(i * cellWidth + deltaScreenX, deltaScreenY, i * cellWidth + deltaScreenX, canvas.getHeight() - deltaScreenY, pBlack);
- }
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 8; j++) {
- unitMatrix[i][j].drawInCell(canvas, deltaScreenX + cellWidth * i * 1f, deltaScreenY + cellHeight * j * 1f);
- /* if (!unitMatrix[i][j].isGround()){
- if(!unitMatrix[i][j].Owner){
- canvas.drawBitmap(frame,deltaScreenX + cellWidth*i * 1f, deltaScreenY + cellHeight*j * 1f,p);
- }
- }*/
- }
- }
- if (!unitMatrix[indexOfCellX][indexOfCellY].isGround()) {
- unitMatrix[indexOfCellX][indexOfCellY].drawOutCell(canvas, +cellWidth * 6, height - deltaScreenY);
- canvas.drawRect(cellWidth * 4.25f, cellHeight * 10.1f, cellWidth * 5.75f, cellHeight * 10.4f, pHealthBarBounds);
- canvas.drawRect(cellWidth * 4.25f, cellHeight * 10.1f, cellWidth * 5.75f - (1 - (float) unitMatrix[indexOfCellX][indexOfCellY].HP / (float) unitMatrix[indexOfCellX][indexOfCellY].MAXHP) * 1.5f * cellWidth, cellHeight * 10.4f, pHealthBar);
- canvas.drawText("Health Points : ", cellWidth * 1.5f, cellHeight * 10.35f, pText);
- canvas.drawBitmap(armor, cellWidth * 4.6f, cellHeight * 10.65f, p);
- canvas.drawBitmap(iconattack, cellWidth * 4.6f, cellHeight * 11.6f, p);
- canvas.drawText(unitMatrix[indexOfCellX][indexOfCellY].SHIELD.toString(), cellWidth * 4.85f, cellHeight * 11.1f, pText);
- canvas.drawText(unitMatrix[indexOfCellX][indexOfCellY].DMG.toString(), cellWidth * 4.85f, cellHeight * 11.85f, pText);
- if (unitMatrix[indexOfCellX][indexOfCellY].HP / 10 > 0)
- canvas.drawText(unitMatrix[indexOfCellX][indexOfCellY].HP.toString() + " / " + unitMatrix[indexOfCellX][indexOfCellY].MAXHP.toString(), cellWidth * 4.5f, cellHeight * 10.35f, pText);
- else
- canvas.drawText(" " + unitMatrix[indexOfCellX][indexOfCellY].HP.toString() + " / " + unitMatrix[indexOfCellX][indexOfCellY].MAXHP.toString(), cellWidth * 4.5f, cellHeight * 10.35f, pText);
- }
- btnTurn.draw(canvas, cellWidth * 3f, cellHeight * 1f);
- if (DrawPermissed) {
- if (TurnOfSide.equals(unitMatrix[indexOfCellX][indexOfCellY].Owner)) {
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 8; j++) {
- if (!unitMatrix[indexOfCellX][indexOfCellY].isGround())
- if (unitMatrix[i][j].isGround()) {
- if (Math.abs(indexOfCellX - i) + Math.abs(indexOfCellY - j) <= unitMatrix[indexOfCellX][indexOfCellY].VALUABLEMOVE) {
- canvas.drawRect(i * cellWidth + deltaScreenX, j * cellHeight + deltaScreenY, (i + 1) * cellWidth + deltaScreenX, (j + 1) * cellHeight + deltaScreenY, pGreen);
- }
- } else {
- if ((Math.abs(indexOfCellX - i) + Math.abs(indexOfCellY - j) <= unitMatrix[indexOfCellX][indexOfCellY].RANGE) && (unitMatrix[indexOfCellX][indexOfCellY].Owner != unitMatrix[i][j].Owner) && unitMatrix[indexOfCellX][indexOfCellY].canAttack) {
- canvas.drawRect(i * cellWidth + deltaScreenX, j * cellHeight + deltaScreenY, (i + 1) * cellWidth + deltaScreenX, (j + 1) * cellHeight + deltaScreenY, pRed);
- }
- }
- }
- }
- }
- canvas.drawRect(indexOfCellX * cellWidth + deltaScreenX, indexOfCellY * cellHeight + deltaScreenY, (indexOfCellX + 1) * cellWidth + deltaScreenX, (indexOfCellY + 1) * cellHeight + deltaScreenY, pYellow);
- }
- }
- boolean firstTouch = false;
- long time = 0;
- public boolean isDoubleClick(MotionEvent event) {
- if (event.getAction() == event.ACTION_DOWN) {
- if (firstTouch && (System.currentTimeMillis() - time) <= 300 && (System.currentTimeMillis() - time) > 50) {
- //do stuff here for double tap
- Toast toast = Toast.makeText(context,
- befpreviousIndexOfCellX.toString() + befpreviousIndexOfCellY.toString(), Toast.LENGTH_SHORT);
- toast.show();
- return true;
- } else {
- firstTouch = true;
- time = System.currentTimeMillis();
- Toast toast = Toast.makeText(context,
- befpreviousIndexOfCellX.toString() + befpreviousIndexOfCellY.toString(), Toast.LENGTH_SHORT);
- toast.show();
- }
- }
- return false;
- }
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- if (event.getX() >= (width * 16 / 17) && event.getY() <= height / 33) {
- btnMenu.isPressed = true;
- menu.show();
- }
- if (event.getX() > cellWidth * 3f && event.getY() >=cellHeight * 1f && event.getX() <= cellWidth * 3f + cellWidth*2 && event.getY() <=cellHeight * 1f + cellHeight/2 ){
- btnTurn.isPressed = !btnTurn.isPressed;
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 8; j++) {
- if (!unitMatrix[i][j].isGround()){
- if (unitMatrix[i][j].Owner.equals(TurnOfSide)){
- unitMatrix[i][j].VALUABLEMOVE = unitMatrix[i][j].MOVE;
- unitMatrix[i][j].canAttack = true;
- }
- }
- }
- }
- TurnOfSide = !TurnOfSide;
- }
- if ((event.getX() >= deltaScreenX) && (event.getX() <= cellWidth * 6 + deltaScreenX) && (event.getY() >= deltaScreenY) && (event.getY() <= cellHeight * 8 + deltaScreenY)) {
- DrawPermissed = true;
- for (int i = 1; i < 9; i++) {
- if (event.getY() > cellHeight * (i - 1) + deltaScreenY && event.getY() < cellHeight * i + deltaScreenY) {
- this.indexOfCellY = i - 1;
- }
- }
- for (int i = 1; i < 7; i++) {
- if (event.getX() > cellWidth * (i - 1) + deltaScreenX && event.getX() < cellWidth * i + deltaScreenX) {
- this.indexOfCellX = i - 1;
- }
- }
- if (!unitMatrix[indexOfCellX][indexOfCellY].isGround() && !isDoubleClick(event)) {
- }
- } else {
- indexOfCellX = 6;
- indexOfCellY = 8;
- DrawPermissed = false;
- }
- if ((event.getX() >= deltaScreenX) && (event.getX() <= cellWidth * 6 + deltaScreenX) && (event.getY() >= deltaScreenY) && (event.getY() <= cellHeight * 8 + deltaScreenY) && isDoubleClick(event)) {
- DrawPermissed = true;
- for (int i = 1; i < 9; i++) {
- if (event.getY() > cellHeight * (i - 1) + deltaScreenY && event.getY() < cellHeight * i + deltaScreenY) {
- this.indexOfCellOnClickY = i - 1;
- }
- }
- for (int i = 1; i < 7; i++) {
- if (event.getX() > cellWidth * (i - 1) + deltaScreenX && event.getX() < cellWidth * i + deltaScreenX) {
- this.indexOfCellOnClickX = i - 1;
- }
- }
- //Передвижение и атака
- if(!unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].ground && unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].Owner.equals(TurnOfSide) ) {
- if ( unitMatrix[indexOfCellOnClickX][indexOfCellOnClickY].ground &&(Math.abs(indexOfCellOnClickX - befpreviousIndexOfCellX) + Math.abs(indexOfCellOnClickY - befpreviousIndexOfCellY)) <= unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].VALUABLEMOVE ){
- unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].VALUABLEMOVE -= Math.abs(indexOfCellOnClickX - befpreviousIndexOfCellX) + Math.abs(indexOfCellOnClickY - befpreviousIndexOfCellY);
- unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].move(indexOfCellOnClickX, indexOfCellOnClickY, befpreviousIndexOfCellX, befpreviousIndexOfCellY, unitMatrix, unitMatrix[indexOfCellOnClickX][indexOfCellOnClickY].isGround());
- indexOfCellX = indexOfCellOnClickX;
- indexOfCellY = indexOfCellOnClickY;
- } else if ((Math.abs(indexOfCellOnClickX - befpreviousIndexOfCellX) + Math.abs(indexOfCellOnClickY - befpreviousIndexOfCellY)) <= unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].RANGE && !(unitMatrix[indexOfCellOnClickX][indexOfCellOnClickY].Owner.equals(unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].Owner)) && unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].canAttack) {
- unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].canAttack = false;
- unitMatrix[befpreviousIndexOfCellX][befpreviousIndexOfCellY].attack(indexOfCellOnClickX, indexOfCellOnClickY, befpreviousIndexOfCellX, befpreviousIndexOfCellY, unitMatrix, unitMatrix[indexOfCellOnClickX][indexOfCellOnClickY].isGround(), canvas);
- Toast toast = Toast.makeText(context,
- "Attacked", Toast.LENGTH_SHORT);
- toast.show();
- }
- }
- }
- befpreviousIndexOfCellX = previousIndexOfCellX;
- befpreviousIndexOfCellY = previousIndexOfCellY;
- previousIndexOfCellY = indexOfCellY;
- previousIndexOfCellX = indexOfCellX;
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement