Here's the full function this originated from, during the fun time of trying to make tic tac toe with nodeJS and a dream, doesn't have victory yet but I did plot out all the conditions(inside said function)
Meanwhile, here's a picture of it running, using even worse means to get a window out of nodeJS and render simple shapes inside of it.
So they're not just doing it inside the condition, but they're also specifically making sure that it always evaluates to "false" so it won't affect the real condition that comes afterwards??
[Thanks to OP for providing a link to the full source in this comment. I have placed the section in the image here for ease of access and to highlight which portion it is.]
17
u/gimife Oct 26 '21
Laughs in python
5
u/Phpminor Oct 26 '21
Here's the full function this originated from, during the fun time of trying to make tic tac toe with nodeJS and a dream, doesn't have victory yet but I did plot out all the conditions(inside said function)
Meanwhile, here's a picture of it running, using even worse means to get a window out of nodeJS and render simple shapes inside of it.
5
u/Roflkopt3r Nov 01 '21
&& (false)So they're not just doing it inside the condition, but they're also specifically making sure that it always evaluates to "false" so it won't affect the real condition that comes afterwards??
1
u/signedchar Nov 03 '21
C has had it before it was cool 😎
6
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Oct 26 '21
Image Transcription: Code
[Thanks to OP for providing a link to the full source in this comment. I have placed the section in the image here for ease of access and to highlight which portion it is.]
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!