Sort of working scrolling window thing.
This commit is contained in:
parent
4227ee1cdc
commit
9cc6724df8
4 changed files with 55 additions and 55 deletions
|
@ -10,46 +10,7 @@ const auto ERROR = fmt::emphasis::bold | fg(fmt::color::red);
|
|||
using namespace fmt;
|
||||
using namespace std;
|
||||
|
||||
/* Idea, the game's combat is based on brainfuck.
|
||||
BF operations:
|
||||
|
||||
> move data pointer +1
|
||||
< move data pointer -1
|
||||
+ inc data pointer cell
|
||||
- dec data pointer cell
|
||||
. output byte
|
||||
, input byte
|
||||
[ - if 0 jump to after ]
|
||||
] if not 0 jump to after [
|
||||
|
||||
Ideas:
|
||||
|
||||
Your hitpoints vs. the boss's hitpoints could be
|
||||
the data. The data could be bits instead of bytes
|
||||
that you turn off/on during combat.
|
||||
|
||||
You then receive items you use to build your code
|
||||
and the boss also receives items each round. Your
|
||||
code runs at the end of the round, and the results
|
||||
calculated.
|
||||
|
||||
I can then come up with old school tech for the
|
||||
different operations so like an old transistor
|
||||
could be the output (.) operation.
|
||||
|
||||
Alright so let's say there's two grids:
|
||||
|
||||
(HP: 100 1's)
|
||||
(CODE: Nothing.)
|
||||
|
||||
At the start of each round you receive maybe 4 items
|
||||
you can place on the code bar. So you could do this:
|
||||
|
||||
(CODE: [+>+>+>.])
|
||||
*/
|
||||
|
||||
Brainfucker::Brainfucker() {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -144,11 +105,9 @@ void Brainfucker::run(int ticks) {
|
|||
print(ERROR, "Unknown operation {}\n", op);
|
||||
}
|
||||
|
||||
++ticks;
|
||||
--ticks;
|
||||
++ip; // not really used but do it anyway
|
||||
}
|
||||
|
||||
println("\nEXIT: dp={}, ip={}", dp, ip);
|
||||
}
|
||||
|
||||
void Brainfucker::set_code(string &new_code) {
|
||||
|
@ -162,6 +121,10 @@ void Brainfucker::reset() {
|
|||
data.fill(0);
|
||||
}
|
||||
|
||||
string Brainfucker::to_string() {
|
||||
return out.str();
|
||||
}
|
||||
|
||||
GameEngine::GameEngine(int hp) : hit_points(hp) {};
|
||||
|
||||
int GameEngine::determine_damage(string &type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue