Skip to content

Commit 97a6760

Browse files
committed
Fix integration issues with duplicated classes.
1 parent 6ea0fb8 commit 97a6760

File tree

7 files changed

+1
-673
lines changed

7 files changed

+1
-673
lines changed

MotionMark/tests/dev/chess/resources/chess.js

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -32,38 +32,6 @@ class RandomAccessSet extends Set {
3232
}
3333
}
3434

35-
36-
// FIXME: Share
37-
class Size {
38-
static zero = new Size(0, 0);
39-
40-
constructor(width, height)
41-
{
42-
this.width = width;
43-
this.height = height;
44-
}
45-
46-
clone()
47-
{
48-
return new Point(this.width, this.height);
49-
}
50-
}
51-
52-
class Position {
53-
static zero = new Position(0, 0);
54-
55-
constructor(x, y)
56-
{
57-
this.x = x;
58-
this.y = y;
59-
}
60-
61-
clone()
62-
{
63-
return new Point(this.x, this.y);
64-
}
65-
}
66-
6735
class GridPosition {
6836
constructor(x, y)
6937
{
@@ -72,35 +40,6 @@ class GridPosition {
7240
}
7341
}
7442

75-
class Rect {
76-
constructor(position, size)
77-
{
78-
this.position = position;
79-
this.size = size;
80-
}
81-
82-
get x()
83-
{
84-
return this.position.x;
85-
}
86-
87-
get y()
88-
{
89-
return this.position.y;
90-
}
91-
92-
get width()
93-
{
94-
return this.size.width;
95-
}
96-
97-
get height()
98-
{
99-
return this.size.height;
100-
}
101-
}
102-
103-
10443
class TreeNode {
10544
constructor(parentNode, position)
10645
{

MotionMark/tests/dev/departements/resources/departements.js

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,60 +23,6 @@
2323
* THE POSSIBILITY OF SUCH DAMAGE.
2424
*/
2525

26-
// Move to shared code
27-
class Size {
28-
static zero = new Size(0, 0);
29-
30-
constructor(width, height)
31-
{
32-
this.width = width;
33-
this.height = height;
34-
}
35-
}
36-
37-
class Position {
38-
static zero = new Position(0, 0);
39-
40-
constructor(x, y)
41-
{
42-
this.x = x;
43-
this.y = y;
44-
}
45-
46-
clone()
47-
{
48-
return new Point(this.x, this.y);
49-
}
50-
}
51-
52-
class Rect {
53-
constructor(position, size)
54-
{
55-
this.position = position;
56-
this.size = size;
57-
}
58-
59-
get x()
60-
{
61-
return this.position.x;
62-
}
63-
64-
get y()
65-
{
66-
return this.position.y;
67-
}
68-
69-
get width()
70-
{
71-
return this.size.width;
72-
}
73-
74-
get height()
75-
{
76-
return this.size.height;
77-
}
78-
}
79-
8026
// To be moved.
8127
class MathHelpers {
8228
static random(min, max)

MotionMark/tests/dev/departements/resources/map-sprites.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class SpriteSheet {
129129
const x = col * cellWidth;
130130
const y = row * cellHeight;
131131

132-
return new Rect(new Position(x, y), new Size(cellWidth, cellHeight));
132+
return new Rect(new Point(x, y), new Size(cellWidth, cellHeight));
133133
}
134134
}
135135

0 commit comments

Comments
 (0)