- 方便代码的交流和维护。
- 不影响编码的效率,不与大众习惯冲突。
- 使代码更美观、阅读更方便。
- 使代码的逻辑更清晰、更易于理解。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 斗地主人工智能 [2007-3-7] | |
| http://www.ylog.net/blog_show.asp?log_id=2148 | |
| 近一周在制作斗地主纸牌游戏的人工智能 | |
| 算法主要是用宽度优先生成一棵搜索树 | |
| 再根据玩牌的技巧进行剪枝与判权.... | |
| 节点权值判断主要由有限状态机构成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Card::flipAction() { | |
| CCSize winSize = CCDirector::sharedDirector()->getWinSize(); | |
| CCSprite* card = CCSprite::spriteWithFile("card_face.png"); | |
| card->setPosition(ccp(winSize.width/2, winSize.height/2)); | |
| this->addChild(card, CARD_FACE_TAG, CARD_FACE_TAG); | |
| card->setVisible(false); | |
| CCSprite* card2 = CCSprite::spriteWithFile("card.png"); | |
| card2->setPosition(card->getPosition()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. 修改 php-fpm.conf 文件,添加(或修改)如下配置: | |
| [global] | |
| error_log = log/error_log | |
| [www] | |
| catch_workers_output = yes | |
| 2. 修改 php.ini 文件,添加(或修改)如下配置: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class Greyscale : MonoBehaviour { | |
| public Material mat; | |
| void Start() { | |
| mat.SetFloat( "_Power", 0.0f ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Evaluate Poker Hands at the flop in Texas Hold'em | |
| import collections | |
| #Some Constants | |
| VALUES = ["A","2","3","4","5","6","7","8","9","10","J","Q","K"] | |
| SUITS = ["s","h","d","c"] | |
| HIGH_STRAIGHT = ["10", "J", "Q", "K", "A"] | |
| #Helper function to check input | |
| def check_card(card): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //wearversion | |
| //wearlog | |
| //wearvoiceinputenable | |
| //wearvoiceinputdisable | |
| //weargoogleapi | |
| //assert | |
| //pushassert | |
| //uplog | |
| //upcrash | |
| //switchnotificationstatus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using Cryptography = System.Security.Cryptography; | |
| using System.Text; | |
| #if UNITY_IOS | |
| using UnityEngine.iOS; | |
| #endif | |
| /// <summary> | |
| /// AdMobUtility |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| MIT License | |
| Copyright (c) 2016 Jesse Ringrose | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # !/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import json | |
| from urlparse import urlparse, parse_qs | |
| import requests |
OlderNewer