Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Last active August 23, 2016 11:55
Show Gist options
  • Save ikuwow/2bcc552c99e998e5bd887248ad477756 to your computer and use it in GitHub Desktop.
Save ikuwow/2bcc552c99e998e5bd887248ad477756 to your computer and use it in GitHub Desktop.
PHP
<?php
/**
* teratail - Q&A community for every thinking engineer
*
* @author Leverages Co. Ltd. Technology Media Lab.
* @since 2014/07/16
*/
function teratail(ThinkingEngineer $you)
{
$question = new Question($you->problems);
$you->postQuestion($question);
while (!$question->resolved) {
$answers = $you->getAnsweres();
if ($you->resolveQuestion($answers)) {
$you->appreciate("Thank you!");
break;
}
}
return $you->evolve();
}
@motohashi
Copy link

teratailのところを機能説明にしたい
最悪4行目消すか…

@ikuwow
Copy link
Author

ikuwow commented Jun 13, 2016

しました

@motohashi
Copy link

実行できなくてもいいよね?

Copy link

ghost commented Jun 13, 2016

一応置いておきます..

function teratail(ThinkingEngineer $you){
    global $world;
    $question = new Question($you->problems);
    $you->postQuestion($question);
    while( $answer = $you->fetchAnswer() ){
        if( !$you->resolve($question, $answer) ) continue;
        $you->appreciate("Thank you!");
        break;
    }
    $world->exp++;
}

@ikuwow
Copy link
Author

ikuwow commented Jun 13, 2016

はい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment