ひろひろの生活日記(LIFE Of HIROHIRO)

パソコン講習とソフト開発をしています。自作小説も掲載しています。ネット情報発信基地(上野博隆)Hirotaka Ueno

pythonテスト2。

2020年05月19日 18時43分00秒 | ゲーム開発(Game development)

ランダム動作。classの例題。

コーディングを掲載してほしいですか?コメントほしい!

説明付きで掲載したいと思っています。

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

将棋、とりあえず棋譜を表示ます。

2020年05月19日 10時55分42秒 | ゲーム開発(Game development)

とりあえず、一人将棋に棋譜を表示するようにしました。

一人将棋

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

体重2020年5月19日(73キロ)

2020年05月19日 05時51分22秒 | 宗教と私と仕事

もうちょっとで73キロ切れるのに

ぎりぎりの我慢です。

73キロ切るのが速いか、バカ食いするのが速いか。

我慢しています。

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

pythonのコーディングを載せてみました。

2020年05月19日 05時43分20秒 | ゲーム開発(Game development)

コーディング掲載しました。

人形が回転します。

 

<pre><code>

# Blit test
import pygame

WIDTH = 640
HEIGHT= 480
BLUE  = (   0,   0, 255)
BLACK = (   0,   0,   0)
WHITE = ( 255, 255, 255)
pygame.init()
screen = pygame.display.set_mode((WIDTH,HEIGHT))
myfont = pygame.font.Font(None, 32)
myclock = pygame.time.Clock()
image1 = pygame.image.load("man.png").convert()

screen.fill(BLUE)
screen.blit(image1, (0, 0))

for i in range(9):
  angle = i * 45
  pos = (i * 64, 80)
  image2 = pygame.transform.rotate(image1,angle)
  screen.blit(image2, pos)
  pos = (i * 64, 140)
  image2.set_colorkey(BLACK)
  screen.blit(image2, pos)
  imagetext=myfont.render(str(angle),True,WHITE)
  postext = (i * 64, 190)
  screen.blit(imagetext, postext)

pygame.display.flip()
endflag = 0

while endflag == 0:
  for event in pygame.event.get():
    if event.type == pygame.QUIT: endflag = 1
  myclock.tick(60)

pygame.quit()

# Blit test
import pygame

WIDTH = 640
HEIGHT= 480
BLUE  = (   0,   0, 255)
BLACK = (   0,   0,   0)
WHITE = ( 255, 255, 255)
pygame.init()
screen = pygame.display.set_mode((WIDTH,HEIGHT))
myfont = pygame.font.Font(None, 32)
myclock = pygame.time.Clock()
image1 = pygame.image.load("man.png").convert()

screen.fill(BLUE)
screen.blit(image1, (0, 0))

for i in range(9):
  angle = i * 45
  pos = (i * 64, 80)
  image2 = pygame.transform.rotate(image1,angle)
  screen.blit(image2, pos)
  pos = (i * 64, 140)
  image2.set_colorkey(BLACK)
  screen.blit(image2, pos)
  imagetext=myfont.render(str(angle),True,WHITE)
  postext = (i * 64, 190)
  screen.blit(imagetext, postext)

pygame.display.flip()
endflag = 0

while endflag == 0:
  for event in pygame.event.get():
    if event.type == pygame.QUIT: endflag = 1
  myclock.tick(60)

pygame.quit()

</code></pre>

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

ざわざわ病

2020年05月19日 05時16分46秒 | 宗教と私と仕事

体が無ずかゆくざわざわする。

力が入らず、

叫びたくなる。

でも克服した。

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする