This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------- index.css ----------------- | |
body { | |
margin: 0; | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | |
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | |
sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//index.mjs | |
import { loadStdlib, ask } from "@reach-sh/stdlib"; | |
import * as backend from './build/index.main.mjs'; | |
const stdlib = loadStdlib(); | |
const isAlice = await ask.ask( | |
`Are you Alice?`, | |
ask.yesno | |
); | |
const who = isAlice ? 'Alice' : 'Bob' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//index.mjs | |
import { loadStdlib } from "@reach-sh/stdlib"; | |
import * as backend from './build/index.main.mjs'; | |
const stdlib = loadStdlib(); | |
const startingBalance = stdlib.parseCurrency(100); | |
const accAlice = await stdlib.newTestAccount(startingBalance); | |
const accBob = await stdlib.newTestAccount(startingBalance); | |
const fmt = (x) => stdlib.formatCurrency(x, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//index.mjs | |
import { loadStdlib, ask } from '@reach-sh/stdlib'; | |
import * as backend from './build/index.main.mjs'; | |
const stdlib = loadStdlib(); | |
const allResults = [ "It's a Draw", "Alice Wins!", "Bob Wins!", "No Result" ]; | |
const isAlice = await ask.ask( | |
`Are you Alice?`, | |
ask.yesno | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//index.mjs | |
import { loadStdlib } from "@reach-sh/stdlib"; | |
import * as backend from './build/index.main.mjs'; | |
const stdlib = loadStdlib(); | |
const startingBalance = stdlib.parseCurrency(100); | |
const accAlice = await stdlib.newTestAccount(startingBalance); | |
const accBob = await stdlib.newTestAccount(startingBalance); | |
const fmt = (x) => stdlib.formatCurrency(x, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//index.mjs | |
import { loadStdlib } from '@reach-sh/stdlib'; | |
import * as backend from './build/index.main.mjs'; | |
const stdlib = loadStdlib(); | |
const startingBalance = stdlib.parseCurrency(100); | |
const accAlice = await stdlib.newTestAccount(startingBalance); | |
const accBob = await stdlib.newTestAccount(startingBalance); |