| 182 | } |
| 183 | |
| 184 | bool TwoPlayerModule::link(int id, bool player2) { |
| 185 | if (m_linkAttempt || m_linkedPlayer) { |
| 186 | globed::toastError("Cannot link while already linked to a player"); |
| 187 | return false; |
| 188 | } |
| 189 | |
| 190 | m_linkAttempt = id; |
| 191 | |
| 192 | // send an link event |
| 193 | this->sendLinkEventTo(id, player2); |
| 194 | |
| 195 | return true; |
| 196 | } |
| 197 | |
| 198 | void TwoPlayerModule::cancelLink() { |
| 199 | m_linkAttempt.reset(); |
no test coverage detected