Gameplay Testing

Learning from AstroPlatformer

Code Runner Challenge

gameplay-testing

View IPYNB Source
%%js
// CODE_RUNNER: gameplay-testing

function test() {
  const coin = {collected: false};
  coin.collected = true;
  console.log(coin.collected ? "PASS" : "FAIL");
}
test();

Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...