Syntax I do not understand (Go.h)

Issue #60 resolved
dsmic created an issue

working, but meaningless syntax?

//this does not look ok?!
      /** Get the x-coordinate of this move. */
      inline int getX(int boardsize) const {return (this->isPass()||this->isResign()?pos:Go::Position::pos2x(pos,boardsize));};
      /** Get the y-coordinate of this move. */
      inline int getY(int boardsize) const {return (this->isPass()||this->isResign()?pos:Go::Position::pos2y(pos,boardsize));};

Comments (3)

  1. Francois van Niekerk repo owner

    Glad you figured it out. Some white-space could definitely clarify those lines :)

  2. Log in to comment