From 399769182a20d53d52f6a2fbb78d7e9f80105280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=A4=92=20=E8=80=80=E5=B9=B3?= Date: Mon, 4 Jul 2022 09:56:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?paiza=E3=81=AE=E5=95=8F=E9=A1=8CB109?= =?UTF-8?q?=E3=81=AE=E5=AE=9F=E8=A3=85=E3=82=B3=E3=83=BC=E3=83=89=E3=81=A8?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B1=E3=83=BC=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ykoiso/src/Eiga.java | 87 +++++++++++++++++++++++++++++++++++++++ ykoiso/test/EigaTest.java | 62 ++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 ykoiso/src/Eiga.java create mode 100644 ykoiso/test/EigaTest.java diff --git a/ykoiso/src/Eiga.java b/ykoiso/src/Eiga.java new file mode 100644 index 0000000..ae81650 --- /dev/null +++ b/ykoiso/src/Eiga.java @@ -0,0 +1,87 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class Eiga { + // 予約されていない席の中で最も見やすい席を探す + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + // 予約済みの席 + final int N = scan.nextInt(); + final int H = scan.nextInt(); + final int W = scan.nextInt(); + // 最も見やすい席の座標 + final int bestx = scan.nextInt(); + final int besty = scan.nextInt(); + // 映画館の生成 + Theatre theatre = new Theatre(H, W, bestx, besty); + // 予約済みの席の登録 + for (int i = 0; i < N; i++) { + int x = scan.nextInt(); + int y = scan.nextInt(); + theatre.addReserved(x, y); + } + // 見やすい席の探索 + List goodSeat = theatre.findGoodSeat(); + // 探索結果の表示x、y、の順に格納されている + for (int i = 0; i < goodSeat.size(); i++) { + System.out.println(goodSeat.get(i) + " " + goodSeat.get(++i)); + } + scan.close(); + } + + static class Theatre { + public int height, width, bestx, besty; + // false:空席 true:予約済み + public boolean[][] theatre; + + // コンストラクタ + // 任意の大きさの映画館生成 + Theatre(int height, int width, int bestx, int besty) { + this.height = height; + this.width = width; + this.bestx = bestx; + this.besty = besty; + theatre = new boolean[this.height][this.width]; + } + + // 予約済みの席の登録を行う関数 + public void addReserved(int x, int y) { + theatre[x][y] = true; + } + + // 見やすい席の探索 + public List findGoodSeat() { + // 現時点で一番短いマンハッタン距離 + // 初期値は最大値+1 + int minTaxiDistance = height * width + 1; + List ans = new ArrayList<>(); + for (int H = 0; H < height; H++) { + for (int W = 0; W < width; W++) { + // マンハッタン距離計算 + if (theatre[H][W] == true) { + continue; + } + int taxiDistance = Math.abs(H - bestx) + Math.abs(W - besty); + if (taxiDistance <= minTaxiDistance) { + minTaxiDistance = taxiDistance; + } + } + } + for (int H = 0; H < height; H++) { + for (int W = 0; W < width; W++) { + if (theatre[H][W] == true) { + continue; + } + int taxiDistance = Math.abs(H - bestx) + Math.abs(W - besty); + if (taxiDistance == minTaxiDistance) { + // 見やすい席の座標をx,yの順にぶち込む + ans.add(H); + ans.add(W); + } + } + } + return ans; + } + } +} diff --git a/ykoiso/test/EigaTest.java b/ykoiso/test/EigaTest.java new file mode 100644 index 0000000..4c1f89e --- /dev/null +++ b/ykoiso/test/EigaTest.java @@ -0,0 +1,62 @@ +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import org.junit.runner.RunWith; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.*; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@RunWith(Enclosed.class) +public class EigaTest { + public static class 大きさ3の映画館で何も予約していないとき { + Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると中心の座標を返す() { + sut = new Eiga.Theatre(3, 3, 1, 1); + List actual = sut.findGoodSeat(); + List expected = new ArrayList<>(); + expected.add(1); + expected.add(1); + assertThat(actual, is(expected)); + } + + @Test + public void 左端を見やすい席にすると左端の座標を返す() { + sut = new Eiga.Theatre(3, 3, 0, 0); + List actual = sut.findGoodSeat(); + List expected = new ArrayList<>(); + expected.add(0); + expected.add(0); + assertThat(actual, is(expected)); + } + } + public static class 大きさ3の映画館で中心を予約しているとき { + Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると中心の上下左右1マスの座標を返す() { + sut = new Eiga.Theatre(3, 3, 1, 1); + sut.addReserved(1, 1); + List actual = sut.findGoodSeat(); + List expected = new ArrayList<>(Arrays.asList(0, 1, 1, 0, 1, 2, 2, 1)); + assertThat(actual, is(expected)); + } + } + public static class 大きさ3の映画館で中心とその上の席を予約しているとき { + Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると上を除く上下左右1マスの座標を返す() { + sut = new Eiga.Theatre(3, 3, 1, 1); + sut.addReserved(1, 1); + sut.addReserved(0, 1); + List actual = sut.findGoodSeat(); + List expected = new ArrayList<>(Arrays.asList(1, 0, 1, 2, 2, 1)); + assertThat(actual, is(expected)); + } + } +} -- GitLab From 2bcad88b24b96eec0e0c9f0404a3fabc496abf48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=A4=92=20=E8=80=80=E5=B9=B3?= Date: Mon, 4 Jul 2022 14:11:07 +0900 Subject: [PATCH 2/3] =?UTF-8?q?paiza=E3=81=AE=E5=95=8F=E9=A1=8CB109?= =?UTF-8?q?=E3=81=AE=E7=AD=94=E3=81=88=E3=81=AE=E5=9E=8B=E3=81=A8=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=80=A4=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ykoiso/src/B109_Eiga.java | 91 +++++++++++++++++++++++++ ykoiso/test/B109_EigaTest.java | 119 +++++++++++++++++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 ykoiso/src/B109_Eiga.java create mode 100644 ykoiso/test/B109_EigaTest.java diff --git a/ykoiso/src/B109_Eiga.java b/ykoiso/src/B109_Eiga.java new file mode 100644 index 0000000..c3882cf --- /dev/null +++ b/ykoiso/src/B109_Eiga.java @@ -0,0 +1,91 @@ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +public class B109_Eiga { + // 予約されていない席の中で最も見やすい席を探す + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + // 予約済みの席 + final int N = scan.nextInt(); + final int H = scan.nextInt(); + final int W = scan.nextInt(); + // 最も見やすい席の座標 + final int bestx = scan.nextInt(); + final int besty = scan.nextInt(); + // 映画館の生成 + Theatre theatre = new Theatre(H, W, bestx, besty); + // 予約済みの席の登録 + for (int i = 0; i < N; i++) { + int x = scan.nextInt(); + int y = scan.nextInt(); + theatre.addReserved(x, y); + } + // 見やすい席の探索 + List> goodSeat = theatre.findGoodSeat(); + // 探索結果の表示xとyがMapで格納されている + for (int i = 0; i < goodSeat.size(); i++) { + System.out.println(goodSeat.get(i).get("x") + " " + goodSeat.get(i).get("y")); + } + scan.close(); + } + + static class Theatre { + public int height, width, bestx, besty; + // false:空席 true:予約済み + public boolean[][] theatre; + + // コンストラクタ + // 任意の大きさの映画館生成 + Theatre(int height, int width, int bestx, int besty) { + this.height = height; + this.width = width; + this.bestx = bestx; + this.besty = besty; + theatre = new boolean[this.height][this.width]; + } + + // 予約済みの席の登録を行う関数 + public void addReserved(int x, int y) { + theatre[x][y] = true; + } + + // 見やすい席の探索 + public List> findGoodSeat() { + // 現時点で一番短いマンハッタン距離 + // 初期値は最大値+1 + int minTaxiDistance = height * width + 1; + List> ans = new ArrayList<>(); + for (int H = 0; H < height; H++) { + for (int W = 0; W < width; W++) { + // マンハッタン距離計算 + if (theatre[H][W] == true) { + continue; + } + int taxiDistance = Math.abs(H - bestx) + Math.abs(W - besty); + if (taxiDistance <= minTaxiDistance) { + minTaxiDistance = taxiDistance; + } + } + } + for (int H = 0; H < height; H++) { + for (int W = 0; W < width; W++) { + if (theatre[H][W] == true) { + continue; + } + int taxiDistance = Math.abs(H - bestx) + Math.abs(W - besty); + if (taxiDistance == minTaxiDistance) { + // 見やすい席の座標をMapにぶち込む + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", H); + seat_coordinate.put("y", W); + ans.add(seat_coordinate); + } + } + } + return ans; + } + } +} diff --git a/ykoiso/test/B109_EigaTest.java b/ykoiso/test/B109_EigaTest.java new file mode 100644 index 0000000..f6766f7 --- /dev/null +++ b/ykoiso/test/B109_EigaTest.java @@ -0,0 +1,119 @@ +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import org.junit.runner.RunWith; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.*; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RunWith(Enclosed.class) +public class B109_EigaTest { + public static class 大きさ3の映画館で何も予約していないとき { + B109_Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると中心の座標を返す() { + sut = new B109_Eiga.Theatre(3, 3, 1, 1); + List> actual = sut.findGoodSeat(); + List> expected = new ArrayList<>(); + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 1); + expected.add(seat_coordinate); + assertThat(actual, is(expected)); + } + + @Test + public void 左端を見やすい席にすると左端の座標を返す() { + sut = new B109_Eiga.Theatre(3, 3, 0, 0); + List> actual = sut.findGoodSeat(); + List> expected = new ArrayList<>(); + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 0); + seat_coordinate.put("y", 0); + expected.add(seat_coordinate); + assertThat(actual, is(expected)); + } + } + public static class 大きさ3の映画館で中心を予約しているとき { + B109_Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると中心の上下左右1マスの座標を返す() { + sut = new B109_Eiga.Theatre(3, 3, 1, 1); + sut.addReserved(1, 1); + List> actual = sut.findGoodSeat(); + List> expected = new ArrayList<>(); + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 0); + seat_coordinate.put("y", 1); + expected.add(seat_coordinate); + seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 0); + expected.add(seat_coordinate); + seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 2); + expected.add(seat_coordinate); + seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 2); + seat_coordinate.put("y", 1); + expected.add(seat_coordinate); + assertThat(actual, is(expected)); + } + } + public static class 大きさ3の映画館で中心とその上の席を予約しているとき { + B109_Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると上を除く上下左右1マスの座標を返す() { + sut = new B109_Eiga.Theatre(3, 3, 1, 1); + sut.addReserved(1, 1); + sut.addReserved(0, 1); + List> actual = sut.findGoodSeat(); + List> expected = new ArrayList<>(); + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 0); + expected.add(seat_coordinate); + seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 2); + expected.add(seat_coordinate); + seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 2); + seat_coordinate.put("y", 1); + expected.add(seat_coordinate); + assertThat(actual, is(expected)); + } + } + public static class 大きさ3の映画館で中心以外の8か所を予約しているとき { + B109_Eiga.Theatre sut; + + @Test + public void 中心を見やすい席にすると中心の座標を返す() { + sut = new B109_Eiga.Theatre(3, 3, 1, 1); + sut.addReserved(0, 0); + sut.addReserved(0, 1); + sut.addReserved(0, 2); + sut.addReserved(1, 0); + sut.addReserved(1, 2); + sut.addReserved(2, 0); + sut.addReserved(2, 1); + sut.addReserved(2, 2); + List> actual = sut.findGoodSeat(); + List> expected = new ArrayList<>(); + Map seat_coordinate = new HashMap<>(); + seat_coordinate.put("x", 1); + seat_coordinate.put("y", 1); + expected.add(seat_coordinate); + assertThat(actual, is(expected)); + } + } +} -- GitLab From 5aa9bd821aa3171f0759fb73d495061269596dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=A4=92=20=E8=80=80=E5=B9=B3?= Date: Tue, 5 Jul 2022 10:11:14 +0900 Subject: [PATCH 3/3] =?UTF-8?q?B034=20=E3=83=AD=E3=83=9C=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=81=AE=E6=AD=A9=E8=A1=8C=E5=AE=9F=E9=A8=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ykoiso/src/B034_Robot.java | 190 ++++++++++++++++++++++++++++ ykoiso/test/B034_RobotTest.java | 211 ++++++++++++++++++++++++++++++++ 2 files changed, 401 insertions(+) create mode 100644 ykoiso/src/B034_Robot.java create mode 100644 ykoiso/test/B034_RobotTest.java diff --git a/ykoiso/src/B034_Robot.java b/ykoiso/src/B034_Robot.java new file mode 100644 index 0000000..1aef6d7 --- /dev/null +++ b/ykoiso/src/B034_Robot.java @@ -0,0 +1,190 @@ +import java.util.Scanner; + +public class B034_Robot { + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + // 各定数読み込み + // 初期座標 + final int X = scan.nextInt(); + final int Y = scan.nextInt(); + // 移動量 + final int W = scan.nextInt(); + final int D = scan.nextInt(); + final int S = scan.nextInt(); + final int A = scan.nextInt(); + // 命令数 + final int N = scan.nextInt(); + // ロボットの生成 + Robot robot = new Robot(X, Y, W, A, S, D); + String order, direction; + // 命令の実行 + for (int i = 0; i < N; i++) { + order = scan.next(); + direction = scan.next(); + robot.executeOrder(order, direction); + } + // 現在の座標の出力 + robot.showCoodinate(); + + scan.close(); + } + + static class Robot { + private int x, y, W, A, S, D; + // ロボットの向いている方向 + // 角度で表すdeg表記 + private int deg = 0; + + // コンストラクタ + Robot(int x, int y, int W, int A, int S, int D) { + // 座標 + this.x = x; + this.y = y; + // 移動量 + this.W = W; + this.A = A; + this.S = S; + this.D = D; + } + + // 方向取得 + // テスト用 + public int getDeg() { + return deg; + } + + // 座標取得 + // テスト用 + public int getX() { + return x; + } + + public int getY() { + return y; + } + + // 座標表示 + public void showCoodinate() { + System.out.println(x + " " + y); + } + + // 命令実行関数 + public void executeOrder(String order, String direction) { + if (order.equals("m")) { + // 移動命令判定 + // 移動関数は絶対座標系 + // ここで相対から絶対に変更 + switch (deg) { + case 0: + moveFront(direction); + break; + case 90: + moveRight(direction); + break; + case 180: + moveBack(direction); + break; + case 270: + moveLeft(direction); + break; + } + } else { + changeDirection(direction); + } + } + + // 方向変更関数 + public void changeDirection(String direction) { + switch (direction) { + case "R": + deg += 90; + break; + case "B": + deg += 180; + break; + case "L": + deg += 270; + break; + } + if (deg >= 360) { + deg -= 360; + } + } + + // 前方移動関数 + // 絶対座標系 + public void moveFront(String direction) { + switch (direction) { + case "F": + y += W; + break; + case "R": + x += D; + break; + case "B": + y -= S; + break; + case "L": + x -= A; + break; + } + } + + // 右方向移動関数 + // 絶対座標系 + public void moveRight(String direction) { + switch (direction) { + case "F": + x += W; + break; + case "R": + y -= D; + break; + case "B": + x -= S; + break; + case "L": + y += A; + break; + } + } + + // 後方移動関数 + // 絶対座標系 + public void moveBack(String direction) { + switch (direction) { + case "F": + y -= W; + break; + case "R": + x -= D; + break; + case "B": + y += S; + break; + case "L": + x += A; + break; + } + } + + // 左方向移動関数 + // 絶対座標系 + public void moveLeft(String direction) { + switch (direction) { + case "F": + x -= W; + break; + case "R": + y += D; + break; + case "B": + x += S; + break; + case "L": + y -= A; + break; + } + } + } +} diff --git a/ykoiso/test/B034_RobotTest.java b/ykoiso/test/B034_RobotTest.java new file mode 100644 index 0000000..e33fe0a --- /dev/null +++ b/ykoiso/test/B034_RobotTest.java @@ -0,0 +1,211 @@ +import static org.junit.Assert.assertThat; +import org.hamcrest.core.Is; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import static org.hamcrest.CoreMatchers.*; +import org.junit.runner.RunWith; + +@RunWith(Enclosed.class) +public class B034_RobotTest { + public static class 方向転換テスト { + B034_Robot.Robot sut; + + @Before + public void setUp() { + sut = new B034_Robot.Robot(0, 0, 1, 1, 1, 1); + } + + @Test + public void 右に方向転換できる() { + sut.executeOrder("t", "R"); + int actual = sut.getDeg(); + assertThat(actual, is(90)); + } + + @Test + public void 後ろに方向転換できる() { + sut.executeOrder("t", "B"); + int actual = sut.getDeg(); + assertThat(actual, is(180)); + } + + @Test + public void 左に方向転換できる() { + sut.executeOrder("t", "L"); + int actual = sut.getDeg(); + assertThat(actual, is(270)); + } + + } + public static class 前向き移動テスト { + B034_Robot.Robot sut; + + @Before + public void setUp() { + sut = new B034_Robot.Robot(0, 0, 1, 4, 3, 2); + } + + @Test + public void 前に1マス移動できる() { + sut.executeOrder("m", "F"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, 1}; + assertThat(actual, is(expected)); + } + + @Test + public void 右に2マス移動できる() { + sut.executeOrder("m", "R"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {2, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 後ろに3マス移動できる() { + sut.executeOrder("m", "B"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, -3}; + assertThat(actual, is(expected)); + } + + @Test + public void 左に4マス移動できる() { + sut.executeOrder("m", "L"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {-4, 0}; + assertThat(actual, is(expected)); + } + + } + public static class 右向き移動テスト { + B034_Robot.Robot sut; + + @Before + public void setUp() { + sut = new B034_Robot.Robot(0, 0, 1, 4, 3, 2); + sut.changeDirection("R"); + } + + @Test + public void 前に1マス移動できる() { + sut.executeOrder("m", "F"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {1, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 右に2マス移動できる() { + sut.executeOrder("m", "R"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, -2}; + assertThat(actual, is(expected)); + } + + @Test + public void 後ろに3マス移動できる() { + sut.executeOrder("m", "B"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {-3, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 左に4マス移動できる() { + sut.executeOrder("m", "L"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, 4}; + assertThat(actual, is(expected)); + } + + } + + + + public static class 後ろ向き移動テスト { + B034_Robot.Robot sut; + + @Before + public void setUp() { + sut = new B034_Robot.Robot(0, 0, 1, 4, 3, 2); + sut.executeOrder("t", "B"); + } + + @Test + public void 前に1マス移動できる() { + sut.executeOrder("m", "F"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, -1}; + assertThat(actual, is(expected)); + } + + @Test + public void 右に2マス移動できる() { + sut.executeOrder("m", "R"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {-2, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 後ろに3マス移動できる() { + sut.executeOrder("m", "B"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, 3}; + assertThat(actual, is(expected)); + } + + @Test + public void 左に4マス移動できる() { + sut.executeOrder("m", "L"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {4, 0}; + assertThat(actual, is(expected)); + } + + } + public static class 左向き移動テスト { + B034_Robot.Robot sut; + + @Before + public void setUp() { + sut = new B034_Robot.Robot(0, 0, 1, 4, 3, 2); + sut.changeDirection("L"); + } + + @Test + public void 前に1マス移動できる() { + sut.executeOrder("m", "F"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {-1, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 右に2マス移動できる() { + sut.executeOrder("m", "R"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, 2}; + assertThat(actual, is(expected)); + } + + @Test + public void 後ろに3マス移動できる() { + sut.executeOrder("m", "B"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {3, 0}; + assertThat(actual, is(expected)); + } + + @Test + public void 左に4マス移動できる() { + sut.executeOrder("m", "L"); + int[] actual = {sut.getX(), sut.getY()}; + int[] expected = {0, -4}; + assertThat(actual, is(expected)); + } + + } +} -- GitLab