代码搜索结果
找到约 10,000 项符合
State Machine 的代码
state.cpp
/****************************************
* Author: Nathaniel Meyer *
* E-Mail: nath_meyer@hotmail.com *
* Website: http://www.nutty.ca *
* *
* You are free to use, redistribute,
state.h
/****************************************
* Author: Nathaniel Meyer *
* E-Mail: nath_meyer@hotmail.com *
* Website: http://www.nutty.ca *
* *
* You are free to use, redistribute,
state.c
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are
state.cpp
// State.cpp: implementation of the CState class.
//
// 本程序是《疯狂的火星虫—面向对象状态机实践指南》的演示程序
//
// 版权所有 (C) 2004 王咏武
// http://www.contextfree.net/wangyw/
//
//////////////////////////////////////////
state.h
// State.h: interface for the CState class.
//
// 本程序是《疯狂的火星虫—面向对象状态机实践指南》的演示程序
//
// 版权所有 (C) 2004 王咏武
// http://www.contextfree.net/wangyw/
//
////////////////////////////////////////////////
state.h
class State //棋盘状态节点,一个State实例就是一个棋盘的状态节点,从而形成一颗树状结构
{
public:
int QP[3][3]; //当前棋盘数组
int e_fun; //评分结果
int child[9]; //当前棋盘状态下的后一步的所有状态节点
int parent; //当前棋盘状态下的父母节点下标
int bestChild;//
state.cpp
// state.cpp: implementation of the state class.
//
//////////////////////////////////////////////////////////////////////
#include "state.h"
//////////////////////////////////////////////////
state.java
import java.util.Hashtable;
public class State{
String name;
Hashtable nextState=new Hashtable();
public State(String getname){
this.name=getname;
}
public void addTransition(FSMEvent e