-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line.TryDodosuko3 method is too strict #1
Comments
I think you should turn Dodosuko3 into a state machine. ドド will set state to 1, Each attempt will try only 4 times, but state will be kept between calls. What do you think? |
Maybe if it reaches 4 it should return early, so that extra ドド or スコ don't get printed... |
Thanks. That's right. I am considering separating the implementation into an iterator and a state machine. I also believe the implementation of TryDodosuko3 should be changed. When I first wrote the code, I implemented it with the vision of Fungo executing (ドド(スコ){3}){3} ラブ注入♡. However, that was a mistake. When Fungo executes (ドド(スコ){3}){3} ラブ注入♡ in the real world, the string generated by Fungo is deterministic. Therefore, there is no problem with the process of generating three (ドド(スコ){3})s. However, this is not the case in ddskgen. Therefore, if we make decisions in units of (ドド(スコ){3})s, as in TryDodosuko3, we will find patterns that do not cover (ドド(スコ){3})s that span each unit. I'm thinking of creating an iterator that simply returns ドド or スコ, and the iterator references a state machine that determines whether (ドド(スコ){3}){3} has been established with a value from 0 to 12. When the state machine reaches 12, the iterator sets the return value of the Next method to false. |
TryDodosuko3 method outputs ドド or スコ 4 times per a call.
if output result is not ドドスコスコスコ, it returns false.
But, a call of TryDodosuko3 may outputs (ドド|スコ){2}ドドスコ, and next call of TryDodosuko3 may outputs スコスコドドスコ.
In this case ドドスコ of 1st output and スコスコ of 2nd output succeeds to build ドドスコスコスコ.
But TryDodosuko3 returns false, and love is not injected.
The text was updated successfully, but these errors were encountered: