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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user