b = loadImage("ムール貝.jpg");
c = loadImage("マスカット.jpg");
d = loadImage("オリーブ.jpg");
e = loadImage("カープ.png");
f = loadImage("レッズ.png");
text("広島県\nクイズ", 50, 90);
button = createButton("かんたん");
button.position(700, 100);
button.style("width", "100px");
button.style("height", "70px");
button.mousePressed(() => {
button = createButton("ふつう");
button.position(820, 100);
button.style("width", "100px");
button.style("height", "70px");
button.mousePressed(() => {
button = createButton("むずかしい");
button.position(940, 100);
button.style("width", "100px");
button.style("height", "70px");
button.mousePressed(() => {
image(a, 70, 220, 200, 130);
image(b, 330, 220, 200, 130);
text("Q.どっちが「カキ」でしょう?", 100, 200);
buttonA.mousePressed(() => {
text("正解!Aがカキです!\n\n広島県はカキの生産量が日本1位!!\n11月~3月がカキの旬で、\n今の時期は日本全国から注文を受けているみたい!", 40, 450);
buttonB.mousePressed(() => {
text("\n残念!Bはムール貝でした!\n\n日本では宮城県でとれることが多いみたい!", 40, 450);
image(c, 70, 220, 200, 130);
image(d, 330, 220, 200, 130);
text("Q.どっちが「オリーブ」でしょう?", 60, 200);
buttonA.mousePressed(() => {
text("残念!Aはマスカットでした!\n\nおとなりの岡山県では「瀬戸ジャイアンツ」\nというマスカットが有名です!", 40, 450);
buttonB.mousePressed(() => {
text("正解!Bがオリーブです!\n\n平成31年に、江田島オリーブ株式会社が\n製造したオリーブオイルが、イタリアで\n開催された国際コンテストで高評価を得ました!", 40, 450);
image(e, 70, 220, 200, 130);
image(f, 330, 220, 200, 130);
text("Q.どっちが広島東洋カープでしょう?", 45, 200);
buttonA.mousePressed(() => {
text("正解!Aがカープです!\n\n広島市を流れる太田川がこいの産地であったことや、\n広島城が「鯉城(りじょう)」と呼ばれていた\nことから「カープ」がつけられました。", 40, 450);
buttonB.mousePressed(() => {
text("残念!Bはシンシナティレッズでした!\n\n海外のプロ野球チームで、\n2022年にカープへ入団した秋山選手が\n前に所属していたチームです!", 40, 450);
function hideQuestion() {
rect(300, 500, 600, 200);
function displayButton() {
buttonA = createButton("A");
buttonA.position(685, 400);
buttonA.style("width", "50px");
buttonA.style("height", "40px");
buttonB = createButton("B");
buttonB.position(945, 400);
buttonB.style("width", "50px");
buttonB.style("height", "40px");