Skip to content

Instantly share code, notes, and snippets.

View mrgarita's full-sized avatar

Shuichi Takeda mrgarita

View GitHub Profile
@mrgarita
mrgarita / index.html
Created March 4, 2024 02:48
JS:スマホの縦でも横でもキャンバスが収まるようにする
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
<!-- /Google Fonts -->
@mrgarita
mrgarita / index.html
Last active December 12, 2023 09:44
素のJavaScriptのみで作った落ちものパズル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="asset/touchicon.png" > <!--ホームアイコンの設定-->
<link rel="SHORTCUT ICON" href="asset/icon.ico"> <!-- PC用ホームアイコンの設定 -->
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@mrgarita
mrgarita / index.html
Last active March 29, 2023 06:30
JavaScript:8パズル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="INDEX,FOLLOW">
<meta name="description" content="シンプルな8パズルゲームです。クリアまでの時間計測つきです。">
<link rel="apple-touch-icon" href="icon.png" > <!--ホームアイコンの設定-->
<link rel="SHORTCUT ICON" href="favicon.ico"> <!-- PC用ホームアイコンの設定 --> <link rel="stylesheet" href="style.css">
@mrgarita
mrgarita / data.json
Created October 5, 2022 01:52
JSON読み込み基本 新しい方法を更に簡潔に記述(fetch)
{
"name": "Alice",
"age": 13,
"sex": "female"
}
@mrgarita
mrgarita / data.json
Created October 5, 2022 01:50
JSON読み込み基本 新しい方法(fetch)
{
"name": "Alice",
"age": 13,
"sex": "female"
}
@mrgarita
mrgarita / data.json
Created October 5, 2022 01:47
JSON読み込み基本 古い方法(XMLHttpRequest)
{
"name": "Alice",
"age": 13,
"sex": "female"
}
@mrgarita
mrgarita / meiro_hitofude.c
Last active September 19, 2022 04:47
C言語:C言語:迷路を一筆書きで抜けるゲーム
/*
meiro_hitofude.c
迷路を一筆書きで抜けるゲーム
Created by dianxnao.com on 2020/08/17.
*/
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
@mrgarita
mrgarita / 1_Basic300.json
Last active February 26, 2022 13:53 — forked from ShinoharaTa/1_Basic300.json
プログラミング英語検定の基本300単語帳アプリサイト
[
{
"name": "accept",
"a": "動詞",
"description": "受諾する"
},
{
"name": "access",
"a": "動詞/名詞",
"description": "アクセスする/アクセス"
@mrgarita
mrgarita / ArcRandom.js
Last active February 16, 2022 02:10
JS:ランダムな位置にランダムな大きさの円を描く
/* ArcRandom.js : ランダムな位置に円を描くクラス*/
class ArcRandom{
// コンストラクタ
constructor(){
this.x = Math.floor(Math.random() * canvas.width); // x座標
this.y = Math.floor(Math.random() * canvas.height); // y座標
this.r = Math.floor(Math.random() * 50) + 1; // 半径
console.log("x: " + this.x + " y: " + this.y + " r=" + this.r);
}
@mrgarita
mrgarita / xRpg4kai.c
Created February 19, 2021 01:49
C言語:文字ベースのRPG風プログラム
/*
xRpg4kai.c RPGゲーム:イベント処理を追加する
CodeName = GUNDAM
履歴
2008-12-10 初期バージョン
2013-02-27 リアルタイムな移動ができるようにした
*/
#include <stdio.h>