Hacker News new | past | comments | ask | show | jobs | submit login

Because you know that after reading about minesweeper, a person naturally wants to play minesweeper. Thanks!

One thing I noticed though - in oldschool minesweeper, left click would test, and right would flag. Right seems to always flag here, but left sometimes tests, and sometimes toggles. Regardless, bookmarked.




Indeed.

A left click on a flagged cell will unflag it. Don't remember why I implemented it this way. Maybe for touch screens which don't have the right click functionality.

Btw, source is here: http://ronilan.com/bugsweeper/js/bugsweeper.js it is with jquery. Don't ask me why.


What I'm referring to though is the case where left-clicking on an UNflagged square flags it. Doesn't seem like that should happen. I'm not sure exactly when it was happening - perhaps the first left click after a right-click flag? Or the first one after a chord?


Maybe it is a bug? Sweep it!


On right click you set app.flagMode to true, but you don't unset it during or after the cellClicked call, so the first left click after a right is treated as another right.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: