summaryrefslogtreecommitdiff
path: root/src/world/proposal.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/world/proposal.test.js')
-rw-r--r--src/world/proposal.test.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/world/proposal.test.js b/src/world/proposal.test.js
index a1e1203..2f870e6 100644
--- a/src/world/proposal.test.js
+++ b/src/world/proposal.test.js
@@ -7,10 +7,10 @@ import {
test("proposals changing different tiles don't conflict", () => {
const a = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
};
const b = {
- world_changes: [{ x: 4, y: 4, from: 'empty', to: 'flag' }],
+ lattice_changes: [{ x: 4, y: 4, from: 'empty', to: 'flag' }],
};
expect(proposal_merge([a], b)).toEqual([a, b]);
@@ -19,10 +19,10 @@ test("proposals changing different tiles don't conflict", () => {
test("proposals changing the same tile to different states conflict", () => {
const a = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
};
const b = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'flag' }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'flag' }],
};
expect(proposal_merge([a], b)).toEqual([]);
@@ -31,10 +31,10 @@ test("proposals changing the same tile to different states conflict", () => {
test("proposals changing the same tile to the same state merge to a single proposal", () => {
const a = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
};
const b = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable' }],
};
expect(proposal_merge([a], b)).toEqual([a]);
@@ -43,10 +43,10 @@ test("proposals changing the same tile to the same state merge to a single propo
test("proposals with identical tile updates but incompatible tile flags conflict", () => {
const a = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a' } }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a' } }],
};
const b = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'b' } }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'b' } }],
};
expect(proposal_merge([a], b)).toEqual([]);
@@ -55,10 +55,10 @@ test("proposals with identical tile updates but incompatible tile flags conflict
test("proposals with identical tile updates but compatible tile flags do not conflict", () => {
const a = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a', r: 'd' } }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a', r: 'd' } }],
};
const b = {
- world_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a', u: 'b' } }],
+ lattice_changes: [{ x: 4, y: 3, from: 'empty', to: 'mutable', flags: { v: 'a', u: 'b' } }],
};
expect(proposal_merge([a], b)).toEqual([a, b]);