title: Is There an Easy Way to Convert a Boolean to an Integer?
body: <p>I am new to scala and I am finding the need to convert a boolean value to an integer. I know i can use something like <code>if (x) 1 else 0</code> but I would like to know if there is a preferred method, or something built into the framework (ie <code>toInt()</code>)</p>