Create a Tic-Tac-Toe game.
- Create a 3x3 grid tic-tac-toe game.
- Once there is a winner, the winning token must be displayed atop the grid.
- The grid must be centered on the page.
-- https://addyosmani.com/resources/essentialjsdesignpatterns/book/#observerpatternjavascript | |
local M = {} | |
-- Storage for topics that can be broadcast | |
-- or listened to | |
local topics = {} | |
-- A topic identifier | |
local sub_uid = 0 |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
import range from 'lodash/range'; | |
/** | |
* Returns the items in a given page. | |
* @template T | |
* @param {number} offset The index offset based on the given `pageIndex` | |
* (precomputed from `calcOffset`). | |
* @param {number} itemsPerPage The number of items per page. | |
* @param {T[]} items The array of items. | |
*/ |