#include "include/DxLib.h"
int pzyoutai = 0;
int azyoutai = 0;
int White = GetColor( 255 , 255 , 255 ) ; // 白色の値を取得
void janken(){
DrawString( 50, 100, "じゃんけんゲーム" , White); //文字列表示
if( CheckHitKey( KEY_INPUT_A ) == 1 ){
DrawString( 80, 120, "パー" , White); //文字列表示
pzyoutai = 1;
}
if( CheckHitKey( KEY_INPUT_B ) == 1 ){
DrawString( 80, 120, "グー" , White); //文字列表示
pzyoutai = 2;
}
if( CheckHitKey( KEY_INPUT_C ) == 1 ){
DrawString( 80, 120, "チョキ" , White); //文字列表示
pzyoutai = 3;
}
azyoutai = GetRand(3);
}
void hantei(){
if(pzyoutai = 1 && azyoutai =2)
DrawString( 80, 150, "あいてはグーです。" , White); //文字列表示
DrawString( 80, 180, "あなたのかちです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 1 && azyoutai =3)
DrawString( 80, 150, "あいてはチョキです。" , White); //文字列表示
DrawString( 80, 180, "あなたのまけです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 1 && azyoutai =1)
DrawString( 80, 150, "あいてはパーです。" , White); //文字列表示
DrawString( 80, 180, "あなたとあいこです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 2 && azyoutai =2)
DrawString( 80, 150, "あいてはグーです。" , White); //文字列表示
DrawString( 80, 180, "あなたのあいこです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 2 && azyoutai =3)
DrawString( 80, 150, "あいてはチョキです。" , White); //文字列表示
DrawString( 80, 180, "あなたのかちです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 2 && azyoutai =1)
DrawString( 80, 150, "あいてはパーです。" , White); //文字列表示
DrawString( 80, 180, "あなたのまけです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 3 && azyoutai =2)
DrawString( 80, 150, "あいてはグーです。" , White); //文字列表示
DrawString( 80, 180, "あなたのまけです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 3 && azyoutai =3)
DrawString( 80, 150, "あいてはチョキです。" , White); //文字列表示
DrawString( 80, 180, "あなたとあいこです。" , White); //文字列表示
WaitKey() ;
if(pzyoutai = 3 && azyoutai =1)
DrawString( 80, 150, "あいてはパーです。" , White); //文字列表示
DrawString( 80, 180, "あなたのかちです。" , White); //文字列表示
WaitKey() ;
}
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; // ウインドウモードに変更
if( DxLib_Init() == -1 ) return -1; // DXライブラリ初期化処理 エラーが起きたら終了
janken();
hantei();
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}
としたのですがtest.cpp(23) : error C2106: '=' : 左のオペランドが、左辺値になっていません。
とwarning C4305: '=' : 'int' から 'bool' へ切り詰めます。
という警告がでてしまいました。
なんとなるわかるようなないようななのですが、
理由がわかりません。