setupBoard()

This method will create your game board with the boundaries set by you. ​

Parameters

width: number - The game width

height: number - The game height

color: string - The hex value for the color of your game board. ​

Returns

Nothing

Usage

This method should be used when you’re ready to set boundaries on your game.

Examples

Example 1

//File code/server/rooms/room.js
onInit() {
	...
	g.setupBoard(2000, 3000, '223211');
}

getSpriteSize()
getSize()

Need Help?

Proofread your code, check with your team and classmates, and if you’re still stuck!

Join us on Google Meet