mrichards42 / xword

Cross-platform crossword solving
https://mrichards42.github.io/xword/
GNU General Public License v3.0
42 stars 13 forks source link

Expose Square::m_bars in luapuz #176

Closed mrichards42 closed 1 year ago

mrichards42 commented 2 years ago

Two possibilities come to mind, no real preference between the two

// perhaps more natural in c++
bool HasBar(Bar bar) { return m_bars[bar]; }
void SetBar(Bar bar, bool doit = true) { m_bars[bar] = doit; }

// maybe easier for lua?
bool HasTopBar() { return m_bars[BAR_TOP]; } // etc
bool SetTopBar(bool doit = true) { m_bars[BAR_TOP] = doit; } // etc
mrichards42 commented 1 year ago

Done in 0a9b0b534be60a4718f8761f67277132ab974a62