UNPKG

card-factory

Version:

A comprehensive library for card manipulation

19 lines (18 loc) 327 B
/** * Bare Bones Card, only prop is facedUp */ export default class Card { _faceUp; constructor() { this._faceUp = false; } get faceUp() { return this._faceUp; } /** * changes whether card is faceUp or not */ flip = () => { this._faceUp = !this._faceUp; }; }