pygame is a game framework for python. It can be used for creating many 2D games.
Contents
basic-window.py
- Opening up a basic windowrectangle.py
- Drawing a rectangle on the windowfollow.py
- Making a circle follow your cursor.
use sickly green for everything!! | |
rgba(74, 133, 74, 153) | |
#4a854a | |
rgb(74, 133, 74) | |
CMYK: 44%, 0%, 44%, 48% | |
HSV: 120°, 44%, 52% | |
HSL: 120°, 29%, 41% |
import discord | |
import inspect | |
def _get_options(callback): | |
sig = inspect.signature(callback) | |
options = [] | |
types = { | |
str: 3, |
This gist shows you how to use message components in discord.py 2.0
This assumes that you know how Object Orientated Programming in Python works, if you don't know what this is then I recommend that you read this guide.
You'll need to install discord.py from git to use this (if you don't have git then google how to install it for your OS, I can't be bothered to put it in here...), if you already have this then you can skip to the next section. However if you don't please read the below
!function(){function r(r,e){for(let t=0;t<3;t++){if(r[0][t]===e&&r[1][t]===e&&r[2][t]===e)return!0;if(r[t][0]===e&&r[t][1]===e&&r[t][2]===e)return!0}return r[0][0]===e&&r[1][1]===e&&r[2][2]===e||r[2][0]===e&&r[1][1]===e&&r[0][2]===e}function e(e){for(let r=0;r<3;r++)for(let t=0;t<3;t++)if("-"===e[r][t])return!1;return!0!==r(e,"x")&&!0!==r(e,"o")}function t(r,e,t){if(parseInt(t)<4){if("-"!==r[0][parseInt(t)-1])return alert("Invalid Move!"),!1;r[0][parseInt(t)-1]=e}else if(parseInt(t)<7){if("-"!==r[1][parseInt(t)-4])return alert("Invalid Move!"),!1;r[1][parseInt(t)-4]=e}else{if(!(parseInt(t)<10))return alert("Invalid Move!"),!1;if("-"!==r[2][parseInt(t)-7])return alert("Invalid Move!"),!1;r[2][parseInt(t)-7]=e}return r}function n(r,e){var t=prompt(`${function(r){var e="";for(let n in r){var t="";for(let e in r[n])t+=`${r[n][e]} `;e+=`${t}\n`}return e}(r)}${e} what is your move? (Type q to quit)`),n=["1","2","3","4","5","6","7","8","9"];for(let r in n)if(n[r]===t)return t;if("q"===t)throw new Error("Stop scrip |
Download both the python files below and put them in your project's root directory, (you may have to rename them because I have prefixed them with numbers so they appear in the order that I want).
Download slash_util from here and put that in your project's root directory.
Then you can install the requirements which are:
youtube_dl
#pragma config(Motor, port3, br, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port4, fl, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port5, belt, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port8, bl, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port9, fr, tmotorVex393_MC29, openLoop) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
#define activation_energy 40 | |
void left_(int a) { |