uuid -> id
This commit is contained in:
@ -18,23 +18,23 @@ async function main() {
|
||||
console.log("Initial player position is", game.player.position);
|
||||
|
||||
let moveResult;
|
||||
const playerUuid = game.player.uuid;
|
||||
const playerId = game.player.id;
|
||||
|
||||
try {
|
||||
console.log("Trying to move right");
|
||||
moveResult = await fh.move(playerUuid, sdk.Direction.RIGHT);
|
||||
moveResult = await fh.move(playerId, sdk.Direction.RIGHT);
|
||||
console.log("Successfully moved to", moveResult.player.position);
|
||||
|
||||
console.log("Trying to move right");
|
||||
moveResult = await fh.move(playerUuid, sdk.Direction.RIGHT);
|
||||
moveResult = await fh.move(playerId, sdk.Direction.RIGHT);
|
||||
console.log("Successfully moved to", moveResult.player.position);
|
||||
|
||||
console.log("Trying to move right");
|
||||
moveResult = await fh.move(playerUuid, sdk.Direction.RIGHT);
|
||||
moveResult = await fh.move(playerId, sdk.Direction.RIGHT);
|
||||
console.log("Successfully moved to", moveResult.player.position);
|
||||
|
||||
console.log("Trying to move down");
|
||||
moveResult = await fh.move(playerUuid, sdk.Direction.DOWN);
|
||||
moveResult = await fh.move(playerId, sdk.Direction.DOWN);
|
||||
console.log("Successfully moved to", moveResult.player.position);
|
||||
} catch (err) {
|
||||
if (err instanceof sdk.PositionError) {
|
||||
|
||||
Reference in New Issue
Block a user