Results 1 to 10 of 12
Like Tree5Likes

Thread: T11Formation.py - socialize your formation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Apprentice jacks's Avatar
    Join Date
    Jul 2014
    Posts
    250
    The whole algorithm of this is just reading numbers and after that write "dl---dc---dc---dr" for example if the first number is 4. Not everyone will download or run this on their hardware (maybe theyre using only mobile phones) thats why im asking about php script .

    Ps. If you can add to this new feature that can say if the formation is legal or not that would be great I can help. For this you need to check if the score of last 3 numbers < 4 then write "formation is illegal"(because formations like this are not legal 4-3-0-2-1), if there is no 4 number detected or 2w or 3w (for example 3-3-0-1-3) then writte "formation is illegal"(because you need atleast 2 players on the flanks) and the last one if in entered numbers are found 3 times things 4, 2w and 3w then write "formation is illegal"(because you can't play with 3 players on the flanks).
    Last edited by jacks; 08-25-2014 at 05:05 PM.

  2. #2
    Dreamer
    Join Date
    Apr 2014
    Location
    Pennsylvania, USA
    Posts
    390
    Quote Originally Posted by jacks View Post
    The whole algorithm of this is just reading numbers and after that write "dl---dc---dc---dr" for example if the first number is 4. Not everyone will download or run this on their hardware (maybe theyre using only mobile phones) thats why im asking about php script .

    Ps. If you can add to this new feature that can say if the formation is legal or not that would be great I can help. For this you need to check if the score of last 3 numbers < 4 then write "formation is illegal"(because formations like this are not legal 4-3-0-2-1), if there is no 4 number detected or 2w or 3w (for example 3-3-0-1-3) then writte "formation is illegal"(because you need atleast 2 players on the flanks) and the last one if in entered numbers are found 3 times things 4, 2w and 3w then write "formation is illegal"(because you can't play with 3 players on the flanks).
    I do actually have an "is_legal" method in the class. I'm just not sure how I want to add it to the input/output.

    As for the simplicity of it, that's pretty intentional. I want to make it a community tool, so I kept it as simple as possible to make it easier to add features later.

    Now that I've had time to think about it I fully intend to make a HTTP response script so that you could easily embed it. I'm going to do some testing in Java because I want to refresh my servlet knowledge anyway.
    Manager of Foresters FC and Guide FC. Both teams on server '161'.

    Wondering if I took the time to type out that fancy formation? Nah, check out my python script!