yangyuan / hearthrock

Hearthstone® Bot Engine
https://yangyuan.github.io/hearthrock/
MIT License
259 stars 69 forks source link

Is there any way to get the history information? #30

Open Almis90 opened 6 years ago

Almis90 commented 6 years ago

It would be nice if RockPlayer class included cards that were used and cards that were discarded for both self and opponent. Yes, you can track your own history with a little bit of work but you cannot track opponent history at least not completely.

yangyuan commented 6 years ago

Currently, this project does not supply history information.

But it is possible and not hard to do that in Hearthrock. However, the history information complex, so far I cannot find an easy way to represent them.

I totally agree that you should not track the history by yourself. So I will leave this as an open issue.

Almis90 commented 6 years ago

I would love to try but I don't know from where to start, maybe you could point me to a direction? I think you should open gitter chat room and we could discuss this there.

yangyuan commented 6 years ago

You can start with analyzing the hearthstone code by using ILSpy. (use that to open the Assembly-CSharp.dll in our releases) Unity3D programming knowledge is also necessary for understanding the code.

The key things you understand are GameState, Card, Entity (and also how to use them).

You can evaluate yourself by reading this: https://github.com/yangyuan/hearthrock/tree/master/src/Hearthrock/Pegasus/Internal/RockPegasus.cs You will be ready if you have no problem in understanding this file.

yangyuan commented 6 years ago

I did some basic analysis, it seems that the client can retrieve very limited history. In that case, I don't see much value of providing history data from hearthrock.