且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C ++冒险游戏

更新时间:2023-02-02 22:24:17

I copy''n''pasted and fixed a few typos (in cases of variable names) and run it and as far as I can see it''s working, I was able to go to the room with the compass and take it.

I did not continue to get the other items.

You should print out more debugging information as you go along ( inventory, ... )

Some suggestions:
- make the inventory at least a vector of items instead of a bitfield (IMO it makes things easier).
- make variable names significant (iPlayer is the inventory ?)
...

anyway, fun little thing you get there, very zork-ish ...
I copy''n''pasted and fixed a few typos (in cases of variable names) and run it and as far as I can see it''s working, I was able to go to the room with the compass and take it.

I did not continue to get the other items.

You should print out more debugging information as you go along ( inventory, ... )

Some suggestions:
- make the inventory at least a vector of items instead of a bitfield (IMO it makes things easier).
- make variable names significant (iPlayer is the inventory ?)
...

anyway, fun little thing you get there, very zork-ish ...