SHARE
TWEET

Code 3

a guest Jun 16th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5. )
  6.  
  7. func hasBlock(x, y int) bool {
  8.     if x < 0 || x >= 1 {
  9.         return false
  10.     }
  11.     return true
  12. }
  13.  
  14. func main() {
  15.     ok := false
  16.  
  17.     for x := 0; x < 1; x++ {
  18.         for y := 0; y < 1; y++ {
  19.             if !hasBlock(x - 1, y) {
  20.                 ok = true
  21.             } else {
  22.                 fmt.Println(x, y, hasBlock(-1, 0), hasBlock(x - 1, y))
  23.             }
  24.         }
  25.     }
  26.  
  27.     if !ok {
  28.         fmt.Println("A bug?")
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top