Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

game jam game broken in /beta #1617

Closed
jwunderl opened this issue Dec 18, 2019 · 4 comments · Fixed by microsoft/pxt#6381
Closed

game jam game broken in /beta #1617

jwunderl opened this issue Dec 18, 2019 · 4 comments · Fixed by microsoft/pxt#6381
Assignees
Labels
bug Something isn't working next-release p2

Comments

@jwunderl
Copy link
Member

Describe the bug

Game jam game doesn't let you fail in /beta; no matter what it says you win and moves on to next game

2019-12-18 11 27 25

To Reproduce
Steps to reproduce the behavior:

  1. Go to arcade/beta
  2. open 'five second games'
  3. run game
  4. See error - it just succeeds every time

Expected behavior

should behave like live site, with chance to fail

@abchatra abchatra added bug Something isn't working p2 next-release labels Dec 18, 2019
@jwunderl
Copy link
Member Author

jwunderl commented Dec 18, 2019

trimmed example, use beta: https://makecode.com/_WfVY2AdsKWRH

the console.log is in my fork of the extension, printing out a value passed in as a boolean here but it's being logged as {}: jwunderl/pxt-gamejam-timer@34b8cdd @mmoskal any ideas?

@jwunderl jwunderl assigned mmoskal and unassigned jwunderl Dec 18, 2019
@mmoskal
Copy link
Member

mmoskal commented Dec 19, 2019

no matter what it says you win and moves on to next game

this seems like an improvement!

Will take a look ;)

@mmoskal
Copy link
Member

mmoskal commented Dec 19, 2019

info.startCountdown(1);
info.onCountdownEnd(end);
function end(win?: boolean) {
    control.assert(win === undefined, 111)
}

minimal repro

@mmoskal
Copy link
Member

mmoskal commented Dec 19, 2019

yet smaller:

class Foo {
    public handler: () => void;
    run() {
        this.handler()
    }
}

function end(win?: boolean) {
    console.log(win)
    control.assert(win === undefined, 111)
}

const f = new Foo()
f.handler = end
f.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next-release p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants