杨帆博客

你想开发游戏还是改变世界?


  • 首页

  • 标签

  • 归档

  • 搜索

Evaluate-Division

发表于 2018-03-21 | 更新于: 2018-08-22

题目地址

LeetCode#399 Evaluate Division

题目描述

  Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer does not exist, return -1.0.

阅读全文 »

【DirectX】6-代码框架3-键盘与鼠标

发表于 2018-03-20 | 更新于: 2018-08-22

教程地址

Tutorial 2: Creating a Framework and Window

学习记录

  上一篇文章 中我们新增了 CInput 和 CGraphics ,但是两个里边都没有实际内容。所以只是填充了框架,而这一篇中我们来完善 CInput 类的分支:CKeyboard 和 CMouse 。

  这一篇之后,我们的框架结构如下:

key2

阅读全文 »

杂杂碎碎的常识第一弹-C函数指针

发表于 2018-03-20 | 更新于: 2018-08-22

  闲着无聊不想敲代码,那就没事复复习吧。突然想到这个的原因是因为想起来自己之前看过的一个东西,首先来看这么一个 C 语言语句。

1
(*(void(*)())0)();

  如果你之前并没有了解过或者了解函数指针的话,那么肯定会和我刚开始看到一样是懵逼的,这篇文章将围绕这个来介绍函数指针。

阅读全文 »

Task-Scheduler

发表于 2018-03-20 | 更新于: 2018-08-22

题目地址

LeetCode#621 Task Scheduler

题目描述

  Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle.

  However, there is a non-negative cooling interval n that means between two same tasks, there must be at least n intervals that CPU are doing different tasks or just be idle.

阅读全文 »

【DirectX】5-代码框架2-CInput与CGraphics

发表于 2018-03-20 | 更新于: 2018-08-22

教程地址

Tutorial 2: Creating a Framework and Window

学习记录

  上一篇文章中,我们构建了一个用于窗口创建的类 CSystem ,并成功使用它启动了窗口。可以看到,在我们封装之后,它的使用及其的方便。而这篇文章中,我们将对其进行扩展,在我们创建窗口后,我们将在主循环中写入程序逻辑。包括我们的鼠标键盘输入以及对应的程序输出,因此,我们将实现 CInput 和 CGraphics 类(之所以不以 COutput 是因为我们的程序不仅仅包含图形一种输出,但我们现在只实现这一种)。在完成今天的两个类后,我们的框架结果将会变为下图的样式 。

dx framework 1

阅读全文 »
1…212223…46
KsGin

KsGin

游戏程序员/计算机图形学/Unity/西山居搬砖

226 日志
16 标签
GitHub E-Mail Google Twitter
© 2018 KsGin @ 2018
0%