1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-20 13:02:10 +00:00

newlands:: implemented new Orbs: Gravity, Intensity, Choice

This commit is contained in:
Zeno Rogue
2018-12-23 03:14:48 +01:00
parent 9d82cea995
commit 2bc66342dd
10 changed files with 300 additions and 48 deletions
+15
View File
@@ -78,6 +78,21 @@ void operator ++(bignum &b, int) {
}
}
void operator --(bignum &b, int) {
int i = 0;
while(true) {
if(isize(b.digits) == i) { b.digits.push_back(bignum::BASE-1); break; }
else if(b.digits[i] == 0) {
b.digits[i] = bignum::BASE-1;
i++;
}
else {
b.digits[i]--;
break;
}
}
}
string bignum::get_str(int max_length) {
if(digits.empty()) return "0";
string ret = its(digits.back());