Returns the next branch to be researched, which is the branch at the front of the research queue. NullValue - There is no branch to be researched.
(&self)
| 128 | /// |
| 129 | /// * NullValue - There is no branch to be researched. |
| 130 | pub fn next_in_queue(&self) -> Result<Branch, GameError> { |
| 131 | if let Some(branch) = self.queue.get(0) { |
| 132 | Ok(branch.clone()) |
| 133 | } else { |
| 134 | Err(GameError::NullValue)? |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | /// Returns the number of rounds left until the upgrade at the front of the |
| 139 | /// research queue is applied. |